How to Fetch or Push Information to External System?
Updated
We can fetch or push data to external system using APIs and we can configure those API execution inside IVR using Add API node.
What are APIs?
APIs are mini programs that help to fetch data from third party servers or applications. It can be a CRM system that stores customer information, or secured bank servers that store user account details. This node helps to fetch or push information using APIs based on certain inputs provided.
Pre-requisite for configuring this node in IVR:
Sprinklr Voice should be enabled for the environment and your user should have IVR View, Edit or Create permission.
Extension need to be configured in sprinklr
Output response structure of the API
Input required for the API and the mandatory fields for the API
In order to call API in between the IVR , In the IVR Builder, click the New icon on the path where you want to add API and select the Add API node action under system nodes.
Here is the sample configuration for Add API node-
Components
Major components of this node are-
API: This field allow you to choose the API Extension from dropdown, all configured extensions will appear in the dropdown.
Input Parameters and Values:
Input Parameters represent the values to be sent to the API. These can be user inputs, case/profile properties, any other resource, the API output coming from other API or the constant value.
Input Values are the specific values against which the input parameters are checked for a match. If a match is found, the required output is returned.
To set up the input, select the appropriate standard API input value on the left and enter the corresponding parameters on the right.
Outputs Parameters and Values:
Output Values refer to the fields we want as output from the API.
Output Parameters are the variable names assigned to the specific output fields
Exception Variable: The Exception Variable is a required field that helps identify whether the API executed successfully or encountered an error. If the API fails, the exception variable will return "true".
Note: This failure will occur when the API will fail. There might be scenerio where API is giving error but the API call is success. In order to handle business error, you need to put decision box later on.
Don't Wait for API Data checkbox: Disabling this checkbox means that the flow will only proceed when data is received from the API. If enabled, the flow will continue without waiting for the API response, allowing the API call to occur asynchronously.
Note: If you have checked the Don't Wait for API Data checkbox, make sure you are not using the response just after the API call as during that time it will be empty. Maker sure using that response in later part of flow when you are sure that the response would have come.
Full API Response Variable: You can define a variable that will store the complete response received from the API.
Note: Ensure that the input variable matches the data type expected by the API. For example, if the API requires a string value, make sure the variable contains a string value.
API node will have two paths-
API successful and API Failed on the basis of Exception Variable.