cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1005
Views
0
Helpful
2
Replies

CVP Call Studio Rest Client POST Body Syntax

Rajesh.Patel
Level 1
Level 1

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

 

 

 

 

2 Replies 2

Try Data.session.ANI not Datasession.ANI

janinegraves
Spotlight
Spotlight

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 .....
}

Getting Started

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: