Oomnitza's wide array of integrations requires precise mappings to ensure data gets to the place you want it in Oomnitza. While we do our best to make this easy using the Oomnitza Mappings Page, sometimes fields are available but do not appear in the mapping page.
Typically, these responses include custom fields from external systems or values from systems where Oomnitza doesn't have a formal connector and are accessed through the API Block. This article discusses when you'll be using these mappings, and how to format them in order to retrieve the data you want.
Formatting Response Variables
To utilize a response variable from an API, you'll need to indicate where that field exists within the JSON response from the source system. Response variables are stored in an object called "response", and can be accessed using {{response.field_name}}
The system is made to be flexible and will recognize paths that are enclosed or not enclosed in double-curly brackets (e.g. {{response.custom_field}}) or custom_field) or nested fields that use either dot, or bracket notation (e.g. {{response.profile["custom_field"]}} or profile.custom_field
For example, if the data coming from the source system appears as so:
{
"profile": {
"field_1": "value 1",
"field_2": "value 2"
},
"status": "value 3"
}
You can access data the following ways, and more:
value 1: response.profile.field_1 or {{response.profile.field_1}} or response.profile["field_1"] or {{response.profile["field_1"]}}
value 2: response.profile.field_2 or {{response.profile.field_2}} or response.profile["field_2"] or {{response.profile["field_2"]}}
value 3: response.status or {{response.status}}
Accessing Response Variables
Response variables currently exist in two places in Oomnitza: Extended Connectors and API Block Responses.
Extended Connectors
Within Extended Connectors, Custom Response Data can be added by clicking the "+" button by the Edit Connector button on the the mappings page:
API Workflow Blocks
In the API workflow block, these values can be added through the response tab after clicking the "Add another" button.
Comments
0 comments
Please sign in to leave a comment.