Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Vonage Contact Center Javascript Engine is a special type of web service that accepts some JavaScript, run the script and returns the results. You can then write these results to Data Sources for use later in the call plan.

...

To use the Vonage Contact Center Javascript Engine, you must create a Data Connector that uses a Web Service interface. For more information about using a Web Service interface, see Retrieving data from a Web Service. Provide the following values in Interaction Definition:

...

When you finish creating the Data Connector applet, click Update.

A message appears. This message states that the JavaScript you provide in the Body element must now be approved by Vonage Contact Center.

Note
titleDouble quotes, tabs, or newline characters in Data Source value

The EscapeDoubleQuotes formatter reformats data source values. When using the Vonage Contact Center Javascript Engine, you can use the EscapeDoubleQuotes formatter to escape any double-quotes, tabs, or newline characters within data sources in your JavaScript methods. 

If the value of a data source contains a double quote ...

for example, a JSON object returned by an earlier call to a web service:
{ "type" : "postcode", "name" : "AB12 3CD" }

... you can add the EscapeDoubleQuotes suffix to the end of the data source name:

{ "script" : "x = '$(AddressDetail:EscapeDoubleQuotes)';" }

Adding the suffix escapes any double-quotes in the data source value. The reformatted value contains escaped double-quotes:

{ "script" : "x = { \\\"type\\\" : \\\"postcode\\\", \\\"name\\\" : \\\"AB12 3CD\\\" };" }

...