Enable Feedback via Response Queue or Callback URL
    • 2 Minutes to read
    • Dark
      Light

    Enable Feedback via Response Queue or Callback URL

    • Dark
      Light

    Article summary

    Overview

    Mapp Connect allows you to gather additional feedback on events processed through the platform. This feedback can be captured using two methods:

    • Response Queue – Sends feedback to a response queue of type “mctFeedback.”

    • Callback URL – Sends feedback via an HTTP POST request to a specified callback URL.

    Response Queue

    Setup

    To enable feedback via the response queue, follow these steps, configure Response Queue as the feedback mode in your integration settings and save.

    Use Case

    A typical Mapp Connect integration sends an event with specific data requirements. However, an invalid JSON payload may occasionally be sent, missing mandatory parameters such as "productSKU."

    Steps:

    1. Send an Invalid JSON Payload
      For example, you send a JSON payload that omits the required "productSKU" field. This represents an event where critical information is missing, which could prevent the system from processing the event correctly.

    2. Error Handling and Logging
      Mapp Connect automatically detects the missing parameter when it processes this invalid payload. An error is triggered in this case because "productSKU" is mandatory. The system logs the error, and a JSON response detailing the issue is generated and stored.

    3. Response Queue Storage
      The error and the corresponding JSON response are saved to the response queue under the "mctFeedback" type. This enables you to track and review errors in your events.
      Example:

      [{
          "errorCode": "MISSING_FIELD",
          "customerId": 33,
          "actionTime": "Thu Apr 13 14:19:10 CEST 2023",
          "integration_id": "a71a48d9-a026-42ce-a2fa-f0b3f79fec41",
          "uuid": "015ee326-91b1-4b7f-8da9-4ee8a3709622",
          "executorId": 3599525,
          "domainId": 35,
          "mappingName": "product",
          "collocation": "S11",
          "sysname": "qatest",
          "actionParams": {
              "addonId": "5294",
              "delete": "true"
          },
          "description": "Skipping product deletion - missing mandatory field: productSKU"
      }]
    4. Retrieving Feedback
      To access this feedback, use the Engage public API to poll the response queue. You can retrieve the stored feedback data by calling the following endpoints:

      • /async/poll

      • /async/pollByRange

      Example:

      https://staging11.shortest-route.com/qatest/api/rest/v13/async/pollByRange?type=mctFeedback&from=1682381313&to=1682419157&limit=2

    Callback URL

    Setup

    To enable feedback via the callback URL:

    1. Configure the Callback URL as the feedback mode in your integration settings.

    2. Provide the callback URL where feedback (in the form of an HTTP POST request) should be sent.

    3. Test the connection, then save.

    Use Case

    A typical Mapp Connect integration sends an event with specific data requirements. However, an invalid JSON payload may occasionally be sent, missing mandatory parameters such as "productSKU."

    Steps:

    1. Send an Invalid JSON Payload
      For example, you send a JSON payload that omits the required "productSKU" field. This represents an event where critical information is missing, which could prevent the system from processing the event correctly.

    2. Error Handling and Logging
      Mapp Connect automatically detects the missing parameter when it processes this invalid payload. An error is triggered in this case because "productSKU" is mandatory. The system logs the error, and a JSON response detailing the issue is generated and stored.

    3. Example of JSON Sent to Callback URL:

      {
          "errorCode": "MISSING_FIELD",
          "customerId": 33,
          "actionTime": "Thu Apr 13 14:19:10 CEST 2023",
          "integration_id": "a71a48d9-a026-42ce-a2fa-f0b3f79fec41",
          "uuid": "015ee326-91b1-4b7f-8da9-4ee8a3709622",
          "executorId": 3599525,
          "domainId": 35,
          "mappingName": "product",
          "collocation": "S11",
          "sysname": "qatest",
          "actionParams": {
              "addonId": "5294",
              "delete": "true"
          },
          "description": "Skipping product deletion - missing mandatory field: productSKU"
      }

    Further Information


    Was this article helpful?

    ESC

    AI Assistant, facilitating knowledge discovery through conversational intelligence