Debug your bot flows
Debugging flows involve finding and fixing issues in the bot's conversations to ensure smooth user interactions. This helps enhance performance and reliability by addressing errors caused by factors like logical mistakes, syntax errors, and missing information in the automated conversations.
Here are some frequently encountered errors and their corresponding solutions.
Flow based errors
In this section we will see how to fix errors that occur at the flow level.
If you notice that certain nodes aren't being executed, consider the following steps:
Test with a text node
Insert a Text node containing a test message into the flow both BEFORE and AFTER the node that's not executing.
For instance, you can print the user's input email right after the email node to verify its functionality.
Utilize the debug feature
When you test a flow in your bot, you'll notice that the bot automatically conducts a step-by-step debugging of each phase of the conversation. It provides insights into the occurrences at each conversation stage. This feature is valuable for identifying the precise point in the flow where the bot's functionality encountered an issue.
Handle datatype mismatch errors
Data type mismatch happens when we assign a data type to a field, but the value we collect ends up being a different type. For instance, if you set a field as a string, but the collected value is actually a number, it causes an error. In this section, we'll explore ways to manage and address these kinds of errors.
Resolve variable datatype conflicts
Go to Automation and click the Variable icon.
Assess if the selected data type aligns with the type of value you intend to collect.
If they don't match, delete that variable and creat a new one and assign it to that node.
Resolve datatype conflicts in database column
Go to Automation > Database > Click the desired table > Table actions > Edit table.
Go through the data type of each field of the database table under Type.
Resolve code based errors
Code errors can lead to non-functioning aspects. To ensure a flawless user experience, it's important to review the code as well.
Check code logs
We offer a dedicated code logs section within our platform.
To access it:
- Navigate to Automation > Functions > Logs.
For instance, if you need to troubleshoot a particular function within your flow and review its output:
Configure the function to display relevant text alongside the data you wish to validate in the Functions section.
Navigate to the Logs section and click on the specific logs.
Use ctrl/cmd + F to open the Search box, enabling you to confirm if the console is indeed displaying the log.
Set up a test function
Once the function gets executed, you can review the logs to see if you're getting the output.
Resolve API level errors
You can test APIs either in the API management page or within the flow.
To test it within a flow:
Go to the API node you wish to test.
Click on Test and enter the mandatory fields.
Click on Run and check if you're able to get the expected output.
You can also test your APIs in the Automation APIs section.
If you have any questions, feel free to post them on our Community
3. Common errors and solutions
Error: Action node failed
"field": "custom_fields.cf_agent",
"message": "It should be one of these values: 'Sarath,Bharath,Ajay,Prem,Senthil,Archana,Sneha Kandasamy (Freshworks),Prashanth Thiagarajan (Freshworks),Aarabhi,Srikanth,Bibin,Ibraz,Animesh,Pawan,Arivazhahan,Kirti,Abrar,Bhavana,Chitrita,Dipesh,Ashok,Nishanth,Athulya,Chandni,Waseem,Akarsh V,Mayank'",
"code": "missing_field"
{
"field": "custom_fields.cf_category761533",
"message": "It should be one of these values: 'Transaction monitoring,Credit limit IncreaseV2,Feature Ask,App Breakages,KYC Verification Dont Use,Missing Label V2,Remittance India to US V2,Remittance U.S to India V2,ACH Transfer V2,WIRE Transfer V2,Credit card Bill Payment V2,Azpire V2,Azpire (linking to fintech Apps) V2,Azpire - Transaction Failures V2,Azpire - Transfers V2,Azpire - Bill Payments V2,Rewards 2.0 V2,Activation Journey V2,Credit card Subscription V2,SIM card request V2,Statements V2,KYC documents - Credit card / Checking account V2,Disputes V2,Card unblock V2,Card Ops V2,Account Closure V2,Bureau Reporting - Unsecured V2,Card logistics V2,Credit score tracker V2,Boost Account V2,Student Loan V2,Login/VPN issues V2,Reconciliation,ATM,CC Transaction Failures,Credit card / Debit card ( linking to fintech Apps),Junk/Influencer SPAM,Callback request'",
"code": "missing_field"
},
Problem: Ticket creation using Freshdesk keeps failing because custom fields that were configured in your Freshdesk account weren't configured/passed in the Freshdesk nodes.
Solution: Pass the custom field names in the parameter - {”key1”:”value1”,..}. The names of the custom fields are derived from the labels given to them during their creation. All the custom fields will have 'cf_' prepended to its name, eg., if you create a custom field with the label 'test', then the name of the custom_field will be 'cf_test'.