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:

  1. Sprinklr Voice should be enabled for the environment and your user should have IVR View, Edit or Create permission.

  2. Extension need to be configured in sprinklr

  3. Output response structure of the API

  4. 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 Space_Icon_Addition.png  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-

Some of the business use case for the API-

  1. Personalise the IVR interaction by fetching customer details like Name using phone Number.

    Example - Greet customer with name.

  2. Self serve the customer using API, by fetching customer details and take action

    Example- Informing account summary, request blocking, payment, etc

  3. Check the user's order history if he calls to raise a return order ticket.

    Example- If user has a order, offer the order related option upfront.

  4. Fetch customer details for upsell.

    Example - Natalie is a customer of Acme Bank. Based on the CIBIL score of Natalie, Acme Bank can make a decision whether Natalie is eligible for loan or not. The CIBIL Score of Natalie can be fetched through an API using Natalie’s details like Account Number, Date of Birth, etc.

  5. Send request to external system for fulfilling any request

    Example - For initiating the refund or return for any order, you can initiate the process by hitting API of other systems

  6. Send interaction history to the CRM


Components

Major components of this node are-

  1. API: This field allow you to choose the API Extension from dropdown, all configured extensions will appear in the dropdown.

  2. Input Parameters and Values:

    1. 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.

    2. 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.

    3. To set up the input, select the appropriate standard API input value on the left and enter the corresponding parameters on the right.

  3. 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

  4. 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.

  5. 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.

  6. 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.