jluncford | 2021-09-30 07:36:40 UTC | #1
When I send a request like this to https://api.usw2.pure.cloud/api/v2/conversations/callbacks the order of the fields set in the queue interaction's Participant Data is completely random. How do I enforce the order?
{ "queueId": "xxx", "callbackUserName": "xxx yyy", "callbackNumbers": ["+15555555555"], "countryCode": "1", "validateCallbackNumbers": true, "data": { "Date Of Birth": "02/01/1960", "Original Text": "Hello your prescription is ready to schedule, click our link", "Original Sent": "2021-09-29T00:20:50Z", "Patient Response": "I fell and I can't get up", "Response Received": "2021-09-28T15:14:30Z", "Phone": "555-555-5555" } }
Jason_Mathison | 2021-09-30 11:40:02 UTC | #2
Hi Janice,
What are you trying to accomplish that requires / helps to have the fields in a particular order?
--Jason
jluncford | 2021-09-30 16:55:40 UTC | #3
We send SMS texts via Twilio to customers which include a link where they can schedule a delivery. Sometimes we get messages back and respond with a text telling them to call us, but in looking at our Twilio logs we can see that the message they sent should be responded to. This is healthcare related so we don't want to ignore them and assume they will call us. They think someone is reading their messages.
I've been implementing an interface this week between our Twilio webhook where we receive the replies and Genesys where these messages are sent to a queue where someone can look at them and respond if necessary. This includes data like the name, date of birth, phone, our original message, their response, timestamps of each, and location. Right now the way these are displayed are completely random and looks odd. I want to present a unified format for our customer service agents to view this information and apparently I can't.
Jason_Mathison | 2021-10-01 12:59:00 UTC | #4
In general JSON is looked as key value pairs, without any real ordering guaranteed. I think that the general approach to get what you want would be to create a form along these lines. Writing out the keys that you want, and then grabbing the value from the JSON. This is just pseudo code, I don't know exactly what tool you are trying to use to display this.
First name: $firstname Last name: $lastname Phone number: $phone_number
--Jason
system | 2021-11-01 12:59:37 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 12198