Articles in this section

The Celigo platform’s canonical format for mock data

You can use mock output to simulate export or mock response import data when configuring flows. Instead of actually executing the export to retrieve sample data (or waiting for webhook listeners to receive data), integrator.io uses the mock output you provide to simulate export data (or mock response to simulate import response data) while you are configuring your flow. Mock data must be in the integrator.io canonical format for JSON.

Note: Webhook listeners always use the canonical format for record data.

Canonical format for record data

{
  "page_of_records":[
    {
        "record":{
           "id":"12345",
           "name":"Mary Poppins",
           "type":"customer",
           "address":{
              "street":"17 Cherry Tree Lane",
              "City":"London"
          }
       }
    },
    {
        "record":{
           "id":"98765",
           "name":"Sherlock Holmes",
           "type":"customer",
           "address":{
              "street":"221B Baker Street",
              "City":"London"
          }
       }
    }
 ]
}

Canonical format for rows data

{
"page_of_records": [{
"rows": [{
"id": "12345",
"name": "Mary Poppins",
"type": "customer",
"address": {
"street": "17 Cherry Tree Lane",
"City": "London"
}
},
{
"id": "98765",
"name": "Sherlock Holmes",
"type": "customer",
"address": {
"street": "221B Baker Street",
"City": "London"
}
}]
}]
}

Canonical format for mock response data

[
{
"id": "1234567890",
"errors": [],
"_json": {
"mockResponse": "replace me"
},
"statusCode": 200,
"ignored": false,
"dataURI": "",
"_headers": {
"content-type": "application/json; charset=utf-8"
}
}
]

Canonical format for NetSuite

{
    "id": 478945,
    "statusCode": 200,
    "_json": {
        "id": 478945
    },
    "ignored": false,
    "errors": [],
    "dataURI": ""
}

Canonical format for Salesforce Composite

{
    "statusCode": 200,
    "id": "0010o000037gWjsAAE",
    "_json": [
        {
            "body": [
                {
                    "id": "0010o000037gWjsAAE",
                    "success": true,
                    "errors": []
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 200,
            "referenceId": "refAccount"
        }
    ],
    "errors": []
}

Canonical format for Salesforce Rest

{
    "statusCode": 200,
    "id": "0010o000037gWmyAAE",
    "_json": {
        "id": "0010o000037gWmyAAE",
        "success": true,
        "errors": []
    },
    "_headers": {
        "date": "Fri, 25 Aug 2023 11:50:41 GMT",
        "sforce-limit-info": "api-usage=10/15000"
    },
    "errors": []
}

Canonical format for Salesforce Soap

{
    "statusCode": 200,
    "id": "0010o000037gWmtAAE",
    "_json": {
        "id": "0010o000037gWmtAAE",
        "success": true
    },
    "
Was this article helpful?
0 out of 1 found this helpful

Comments

3 comments
Date Votes
  • Hi Tom Santiago,

    The "rows data" example isn't valid JSON, the address objects are missing closing braces.

    {
        "page_of_records": [{
            "rows": [{
                    "id": "12345",
                    "name": "Mary Poppins",
                    "type": "customer",
                    "address": {
                        "street": "17 Cherry Tree Lane",
                        "City": "London"
                    }
                },
                {
                    "id": "98765",
                    "name": "Sherlock Holmes",
                    "type": "customer",
                    "address": {
                        "street": "221B Baker Street",
                        "City": "London"
                    }
                }
            ]
        }]
    }

    Also, it may be worth mentioning that Webhooks expect the "Record Data" format.

    Lastly, and I'm not sure this is the right document for this, but what is the difference and/or relationship between Webhook Sample Data and Mock Output - to me they're the same, but I'm probably missing something.

    0
  • Hi Steve Klett,

    Thanks for the catch on the errant JSON text (revised). I also added a note about webhook listeners using canonical format for record data. Regarding your final question, with webhook sample data:

    General URL & sample data

    Sample data: Click Click to show to populate the sample data field with the webhook data most recently received by the public URL endpoint. If the public URL endpoint has not yet received any data, you can manually enter sample JSON data in the field provided.

    And here is the currently existing documentation on Mock output data for webhook listeners:

    Add mock data to webhook listeners 

    You can also save mock output data to generic webhook listeners. This works the exact same way as for Mock output for Exports and Lookups, except that it is not possible to fetch preview data to populate the mock data field. Click the Expand Window button to open and view the single pane JSON editor.

    I think a future release will eliminate the redundancy as it currently stands for webhook listeners.

    Tom

     

     

    0
  • Cool, thanks Tom.

    0

Please sign in to leave a comment.