We are attempting to gather all participant data (from the external participant specifically) in a single JSON object. The data action seems to work and the raw JSON looks like what we want. However, we are having trouble getting the output contract to show the return object and allow us to use it. The reason for doing so is that we will be sharing the participant data with an external service and we need all the keys and values to pass along to this service.
We are calling this api:
/api/v2/conversations/${input.conversationId}
Using this response template:
{
"translationMap": {
"attributes": "$.participants[0].attributes"
},
"translationMapDefaults": {},
"successTemplate": "{\n "attributes": ${attributes}\n}"
}
Because our list of participant data be different from time to time, we want to be able to gather ALL existing properties, regardless of how many there are. I think this may be where we are getting into trouble as it seems that output contracts want you to go to an individual property and return the value - whereas we want keys and values of everything. Does anyone know of a way to do this? Here is the return JSON we're getting:
{
"attributes": {
"customerIntentPreRuleLoop": "2024-02-14T23:54:40.434Z",
"customerPersonId": "",
"zipCode": "84088",
"printCustomerPersonId": "",
"callbackForce": "true",
"callbackEnable": "true",
not all keys shown
}
}
This action publishes just fine, but doesn't show any output available when calling it in an architect flow. We'd like to be able to drop this direct into a JSON object. Here is the current output contract (which doesn't work)
{
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {},
"additionalProperties": true
}
},
"additionalProperties": true
}