Integration
What's an Integration Block?
It's a block that allows the use of prepared integration. It calls the integration service and saves the output variables in memory.
The result of the integration is available as memory.response
or by another variable name if configured in the Integration module.
Best practices
Remember that any usage of integration may result in an error. If memory.success
is not true
then it means that the integration call was not successful and your bot needs to handle such a case.
There might be multiple reasons why integration call fails:
- External API is faulty - use curl or Postman to debug external API
- Temporary network glitch
- Wrong usage of curly brackets
{}
- if you want to embed string value in field that is already in double quotation marks make the brackets double eg.
{
"role": {someParameter},
"content": "Some text: {{someParameter}}"
}
If there is a risk that the call to integration will take longer, please consider using the BlockOperation functionality.
Fire and forget
In some cases when you do not want to parse the integration response you can select Skip response
in block settings. In such a case, the bot will trigger the integration but not block the flow - in other words, it will not wait for integration to finish execution. Moreover, the timeout parameter in Integration settings is ignored.
When Skip response
is selected the only way to know if the call was successful is by reading the logs of the dialogs application.
Further reading
Read more on Integration module here
Updated about 1 month ago