09-09-2021 03:55 PM
Hi All,
I'm trying to create a Rest Client POST rest to and AWS service with customer specific data in the body.
I have managed to get a successful response with static fixed data
{
..... other parameters .....
"templateID": "templatename",
"to": ["+447813123456"],
"text": "SMS Message to be specified",
..... other parameters .....
}
However, I need to use the customer ANI in the "to" field and a DataSession field in the "text" field.
I have tried various formats
["+44"{CallData.ANI}]
[{DataSession.CustANI}]
[{DataSession.msgTest}]
{DataSession.msgTest}
but the request fails with a "statusCode":"400""message":"Please validate the content before requesting the service."} in the response.
Would anyone know what the syntax needs to be to
-configure the international dialling code with the customer ani calldata for the "to" field,
-string text and customer data for the "text" field
Thanks in advance
09-12-2021 04:15 AM
Try Data.session.ANI not Datasession.ANI
09-12-2021 02:14 PM
Try this:
1. Use a Set Value element to assign into a Local variable named LocalToField with the javascript:
'"+44' + {CallData.ANI} + '"' (apostrophe quote +44 apostrophe + {CallData.ANI} + apos quote apos
this will result in the LocalToField containing something like this surrounded by quotes: "+448005551212"
Then this is the message body:
{
..... other parameters .....
"templateID": "templatename",
"to": [{LocalVar.LocalToField}],
"text": "SMS Message to be specified",
..... other parameters .....
}
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: