Code Step Integration
- What is Code Step? How to Use Code Step?What is a Code Step? The purpose of a Code Step is to take the input collected from the static and use custom code to perform business logic on it. The…
- How to Send Entity Values to API to Fetch DataSending entity values to API to fetch data Once the entity value is stored in a variable on the Code step, you can use this variable to send this to the API…
- How to Display Output Using Output StepUsing Output step to display Output One Code step can be connected to multiple Output steps. Depending on the conditions provided while making a connection…
- Using "user_details" VariableUser Details The Data that is stored in this context variable will be saved at a user level and will be available for all the conversations that the user has…
- Using Logger Support for DebuggingLogger support in Code Executor You can use the standard python logging library inside the code editor. See the below snippet for reference import json import…
- Providing Sample Input in Code StepThe code will be executed using the sample input data and the output and logs will be shown at the bottom of the code executor window.
- How to Create HSLs in Code Editor1. Display a static HSL element - You can use HSL's (Chat Elements) to display different elements on the bot, such as carousels and buttons. To display HSLs…
- How to Use Entity Values on Code StepUsing Entities on Code Editor The information which is collected from users on the Static Step, in the form of entities, can be used on Code Step to fetch…
- Using "final_response" in Main MethodUsing final_response The format or values which the code will return depends on final_response present in def main(event, context) . The default final_response…
- Using "conversation_details" VariableConversation Details conversation_details is a variable, that acts as a common store between all the code steps. The data stored in conversation_details is…
- Using Environment VariablesYou can set environment variables for the code executor to store values like database username and passwords that you don't want to expose inside the code. The…
- Using External Packages in Code StepSupported Packages Default - List of Packages here Extra packages - chardet-3.0.4 gspread-3.1.0 httplib2-0.13.1 idna-2.8 mysqlclient-1.4.2 oauth2client-4.1.3…
- How to Execute the Code StepIn order to execute the Code Step, you will have to first save the code. You can save it by selecting the Save button, prior to executing it. Once you have…
- Implementing API Failure Alerting MechanismFollow the below steps to integrate the custom haptik_requests library in Code Nodes to capture API metadata. Import class inside custom package at top the of…