Add External API in Sprinklr
Updated
Sprinklr offers a streamlined way to import, configure, and create API extensions using the UI. This significantly reduces the turnaround time for configuring third-party APIs on Sprinklr’s platform.
Once configured, you can call third-party (external) APIs during workflow execution across various capabilities such as Bots, Guided Workflows, Agent Consoles, Care Consoles, Automation, and more. This new feature enhances automation and eliminates manual processes, boosting productivity.
Note: Configuration is required. Please contact the Managed Services team for further assistance.
Prerequisites
You need to add an External Authentication Credential in Sprinklr. For more information, refer to Add an External Authentication Credential in Sprinklr .
Note:
For static APIs, external authentication credentials are not required.
You can register an External API in Sprinklr only if you are a Global Admin or Global User.
If you are an administrator and wish to grant users permission to add an external API, create a role with the following permissions and assign it to the correct user or user group.
Steps to Register an External API
Click the New Tab icon .
Under the Platform Module, click All Settings within Listen.
In the Platform Settings window, click Manage Customer in the left pane and select External API from the list of options in the right pane. You can also search for it using the search bar.
In the External API window, click Add External API in the top right corner.
In the External API window, fill in the following details:
External Service Name: Enter the name of the external service.
Description (optional): Provide a description for the external service.
Authentication Credential: Enter the required authentication credential.
OpenAPI Specification: Enter the service schema in JSON format.
6. Click Validate in the bottom right corner of the External API window.
Note: You can now define field type for the request parameters present in the external API. Supported field types include String, Integer, Number, Boolean, Object, and Form.
7. (Optional) Check the Request via Proxy box if you wish to expose the APIs via proxies. Ensure that the Sprinklr Static IP Addresses for Receiving API Calls are whitelisted. You can also add Proxy Host and Proxy Port fields when you check the Request via Proxy checkbox.
8. Click Save in the bottom right corner to register the external API.
Manage an External API
Click the New Tab icon.
Under the Platform Module, click All Settings within Listen.
In the Platform Settings window, click Manage Workspace and select External API from the options. You can also search for it in the search bar above.
In the External API window, click the Options icon and alongside to External Service Name and select either Edit or Delete as needed.
You can edit and Update the URL and Authentication credential from the UI.
Automated Groovy Generator for REST API
In 19.8 release, we have introduced an Automated Groovy Generator that streamlines the process of configuring REST-based external APIs by automatically generating the necessary Groovy script for request adapters.
How it Works?
When configuring a REST API, you can use the Generate Adapter button. Upon clicking this button, the system will automatically generate the Groovy script tailored to your specific API configuration. This script will then be directly pasted into the request adapter text box, eliminating the need for manual coding.
This feature enhances the overall user experience by making REST API configuration more efficient and less prone to manual errors.