Variables Used for Callback and Task APIs

Use the following variables to pass values as part of the callback or task API requests.

Call Variables

When Customer Collaboration Platform initiates a callback or task request with Unified CCE then the variables cv_1 to cv_10 are included as call variables. The prefix "cv_" is not case-sensitive.

ECC Variables

When Customer Collaboration Platform initiates a callback or task request with Unified CCE then the variables that start with the string "user_" are included as Expanded Call Context (ECC) variables. The prefix "user_" is not case-sensitive.

If you send an ECC variable that is not configured in Unified CCE, then it does not result in failure. Unified CCE ignores the variable.

Extension Fields

All the variables that are associated with the request in the XML are included as extension fields in the Customer Collaboration Platform callback or task contact.

To specify the media type of POD , pass a variable with the name "mediaType" and set a value from the following list. If you don't specify the variable mediaType, then the media type "event" is set to the Piece Of Data (POD).

  • chat

  • email

  • event

  • mobile

  • social

  • video

  • voice

  • web

To pass the POD reference URL that is already created for the incoming task request to Unified CCE, pass a variable with the name "podRefURL", with URL as the value. If you don't specify the variable podRefURL, then Customer Collaboration Platform creates the POD.

Examples

The following are the examples to create a Customer Collaboration Platform callback or task contact using POST and GET.

Note

These examples do not include all the Customer Collaboration Platform callback or task contact attributes.

Create Customer Collaboration Platform Callback / Task Contact using POST

The following example shows how to submit a new request with call variable "cv_7" set to "test7", ECC variable "user_user.callback.test" set to "ct7", extension field location set to "Boston", and with "tags".

For callback:


<Contact>
   <name>Customer</name>
   <title>Help</title>
   <mediaAddress>5551212</mediaAddress> 
    <tags> 
      <tag>tag1</tag> 
      <tag>tag2</tag> 
      <tag>tag2</tag> 
    </tags> 
   <variables>
      <variable>
         <name>cv_7</name>
         <value>test7</value>
      </variable>
      <variable>
         <name>user_user.callback.test</name>
         <value>ct7</value>
      </variable>
      <variable>
         <name>location</name>
         <value>Boston, MA</value>
      </variable>
   </variables>
</Contact>

For task:


<Task>
   <name>Customer</name>
   <title>Help</title>
   <scriptSelector>5551212</scriptSelector>
   <requeueOnRecovery>true
   </requeueOnRecovery>
   <tags> 
      <tag>tag1</tag> 
      <tag>tag2</tag> 
      <tag>tag2</tag> 
    </tags> 
   <variables>
      <variable>
         <name>cv_7</name>
         <value>test7</value>
      </variable>
      <variable>
         <name>user_user.callback.test
         </name>
         <value>ct7</value>
      </variable>
      <variable>
         <name>location</name>
         <value>Boston, MA</value>
      </variable>
      <variable> 
         <name>mediaType</name> 
         <value>chat</value> 
      </variable>
      <variable> 
         <name>podRefURL</name> 
         <value>https://context-
         service.rciad.ciscoccservice.com/
         context/pod/v1/podId/b066c3c0-c346
         -11e5-b3dd-3f1450b33459</value> 
      </variable>
   </variables>
</Task>

Create Customer Collaboration Platform Callback / Task Contact using GET

The following example shows how to submit a new request with call variable "cv_7" set to "test7", ECC variable "user_user.callback.test" set to "ct7", extension field location set to "Boston", and with "tags" parameter in the query string.

When you use GET to create a request, variables must be passed as query parameters. Variables are denoted by the "variable_" prefix.

For callback:

https://sample_server/ccp/rest/callback/feed/12345?name=Customer&title=Help&mediaAddress=5551212
&variable_cv_7=test7&variable_user_user.callback.test=ct7&variable_location=Boston&tags=tag1,tag2,tag3

For task:

https://sample_server/ccp/rest/task/feed/100093?name=Customer&title=Help&description=
some_desc&scriptSelector=5551212&requeueOnRecovery=true&variable_podRefURL=https://context
-service-uq/context/v1/skjdskdgskd&variable_mediaType=chat&variable_cv_7=test7
&variable_user_user.callback.test=ct7&variable_location=Boston&tags=tag1,tag2,tag3

Creation of Customer Collaboration Platform Social Contact

The above examples for POST and GET results in the creation of the following Customer Collaboration Platform social contact:

For callback:


<SocialContact>
   <author>Customer</author>
   <title>Help</title>
   <description />
   <extensionFields>
      <extensionField>
         <name>mediaAddress</name>
         <value>5551212</value>
      </extensionField>
      <extensionField>
         <name>location</name>
         <value>Boston, MA</value>
      </extensionField>
      <extensionField>
         <name>cv_7</name>
         <value>test7</value>
      </extensionField>
      <extensionField>
         <name>user_user.callback.test
         </name>
         <value>ct7</value>
      </extensionField>
      <extensionField>
         <name>ewt</name>
         <value>8</value>
      </extensionField>
   </extensionFields>
   <status>handled</status>
   <statusReason>externally_handled
   </statusReason>
   <tags>
      <tag>tag1</tag>
      <tag>tag2</tag>
      <tag>tag3</tag>
   </tags>
</SocialContact>

For task:


<SocialContact>
   <author>Customer</author>
   <title>Help</title>
   <description>some_desc</description>
      <extensionFields>
      <extensionField>
         <name>scriptSelector</name>
         <value>5551212</value>
      </extensionField>
      <extensionField>
         <name>location</name>
         <value>Boston, MA</value>
      </extensionField>
      <extensionField>
         <name>cv_7</name>
         <value>test7</value>
      </extensionField>
      <extensionField>
         <name>user_user.callback.test
         </name>
         <value>ct7</value>
      </extensionField>
      <extensionField>
         <name>ewt</name>
         <value>8</value>
      </extensionField>
      <extensionField>
         <name>mediaType</name>
         <value>chat</value>
      </extensionField>
      <extensionField>
         <name>podRefURL</name>
         <value>https://context-
         service.rciad.ciscoccservice.com/
         context/pod/v1/podId/b066c3c0-c346
         -11e5-b3dd-3f1450b33459</value> 
      </extensionField>
   </extensionFields>
   <status>handled</status>
   <statusReason>externally_handled
   </statusReason>
   <tags>
      <tag>tag1</tag>
      <tag>tag2</tag>
      <tag>tag3</tag>
      <tag>requeueOnRecovery</tag>
   </tags>
</SocialContact>