Integrating Responses Through APIs

Updated 

You can leverage the Standard CRUD APIs for survey responses to programmatically create, retrieve, update, or delete response data within the Sprinklr system. This capability facilitates seamless integration with external systems and supports automated workflows.

Business Use Cases

  • Facilitates the automatic integration of large quantities of survey responses from external systems into Sprinklr.

  • Enables downstream analytics tools to retrieve or modify response data as required.

  • Can be utilized to perform bulk updates on older responses in light of the latest information for analytical purposes.

Automating response data management saves manual effort while enhancing data accuracy and consistency across platforms. It also enables real-time analytics pipelines by syncing responses as they come in, allowing for timely and informed decision-making.

Prerequisites

You would need View and Edit Response and Analytics permissions at the Survey Level.

Setting Up Response through Customer Feedback Management API

  1. Make sure that the Sprinklr user who has been verified to use the API can access the survey’s analytics on the user interface.

  2. Make sure you have the “SurveyID” for the survey you want to configure the API for.

  3. Request a sample payload from Sprinklr Support for the API you intend to utilize.

How to use it?

  • Ingest Responses (Bulk or Single)

    • Utilize this API to submit one or multiple survey responses into the Sprinklr system from external sources such as CRMs, internal applications, or offline data gathering tools.

    • Streamline the process of bulk data ingestion to enhance the speed of data accessibility.

    • Sample API body with SurveyID passed in Header:

      {

      "questionResponses": {

      "questionID_questionOptionID": ["1"],

      "questionID": ["Free-text answer"]

      },

      "responseTime": "2025-03-06 15:00:00",

      "tags": ["tag1"],

      "elapsedTime": 1000000,

      "responderSnType": "EMAIL",

      "responderSnId": "divisht.jaiswalgurgaon@sprinklr.com",

      "surveyLanguage": "en",

      "distributionChannel": "EMAIL",

      "customFields": {

      "responseCustomFields": {

      "_c_67cb50793cae6f06c0c41de0": ["5"]

      },

      "transactionCustomFields": {

      "_c_67056c1056182e36198d8eea": ["WHATSAPP"]

      },

      "profileCustomFields": {

      "_c_64cbf526fd8b0e259d72470a": ["20"]

      }

      }

  • Get Responses (Using Filters)

    • Obtain a list of survey responses that fulfill particular filtering criteria, including survey custom properties or responder characteristics.

    • Collect survey responses in large quantities according to specific criteria for the purpose of reporting or integration.

    • Sample API Body with SurveyID passed in Header:

      {

      "filters": [

      {

      "field": "SURVEY_CUSTOM_PROPERTY",

      "filterType": "IN",

      "values": ["10038189 - LA ESTACION S.A - 79"],

      "details": {

      "fieldName": "_c_67ce77b1ddff1d4b9bc831ce"

      }

      }

      ]

      }

  • Get Response by ID

    • Retrieve an individual survey response by utilizing its unique Response ID.

    • Obtain a particular reply for examination, auditing, or modification.

    • Users must include the Response ID in the API header.

  • Update Response by ID

    • Change particular areas in a survey response, including the modification of tags, custom fields, or metadata.

    • Improve or enhance current replies by adding missing information or making corrections.

    • Utilize this API for performing bulk updates through scripts.

    • Example API payload featuring responseID in the header:

      {

      "updates": {

      "responseCustomFields": {

      "_c_67cb50793cae6f06c0c41de0": ["5"]

      },

      "transactionCustomFields": {

      "_c_67056c1056182e36198d8eea": ["WHATSAPP"]

      },

      "profileCustomFields": {

      "_c_64cbf526fd8b0e259d72470a": ["20"]

      }

      }

      }

  • Delete Response by ID

    • Delete a survey response permanently by utilizing its Response ID.

    • Remove any duplicate, test, or incorrect entries from the system.

    • API has the response ID in its header.

You can even test the process to ensure it aligns with the “How It Works” section. Start by using a test survey and a test responder email (e.g., test@sprinklr.com). Once the response is submitted, check that the API returns a successful status (200 OK), and verify that the response is visible in the Sprinklr UI under the Survey Responses tab.

Key points to note

  • You need to be aware of the SurveyID and the specific ResponseIDs for operations.


Best Practices

  • Always verify the necessary fields prior to ingestion.

  • Utilize APIs in groups for large-scale data ingestion to minimize overhead.

  • Utilize filtering with appropriate fields to refine GET APIs and prevent timeouts.