Jump to: navigation, search

RenderStandardResponse

This operation is part of the Standard Response API section of the Web Services API.

Overview

A Standard Response is a text template with placeholders that are replaceable, resulting in a standardized yet customized message according to the situation and customer. This operation renders a body of text based on keyword data provided by the client to replace placeholders in the Standard Response text.

For example, the following template:

Hello <$ Contact.FirstName $> <$ Contact.LastName $>, I am <$ Agent.FirstName $> and I am happy to help you. Can you provide me with the <$ Custom.ProductName $>'s model number?

results in the following standard response:

Hello Scott Summers, I am Jean and I am happy to help you. Can you provide me with the Awesome Vacuum Cleaner's model number?

If any of the keywords or values are missing from the client or the stardard response code references a field that doesn't exist, the value is replace with None. For example:

Hello Scott Summers, I am None and I am happy to help you. Can you provide me with the None's model number?

Request

Request URL /api/v2/platform/contactserver/RenderStandardResponse/{standardResponseId}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value Mandatory
interactionId Interaction identity Optional. Note that one of the identity parameters must be specified.
chatId Interaction identity Optional. Note that one of the identity parameters must be specified.
facebookId Interaction identity Optional. Note that one of the identity parameters must be specified.
emailId Interaction identity Optional. Note that one of the identity parameters must be specified.
facebookSessionId Interaction identity Optional. Note that one of the identity parameters must be specified.
tweetId Interaction identity Optional. Note that one of the identity parameters must be specified.
usePlainText Values can be true or false. Optional
customProperties List of Custom properties Optional
agentCustomProperties List of Agent Custom properties Optional

To render a Standard Response, make a POST Standard Response REST resource call with parameters consisting of key value pairs, representing substitutions for keywords within the Standard Response body.

Sample

POST http://.../api/v2/platform/contactserver/RenderStandardResponse/23423423423
{
                    "interactionId" : "2390472394",
                    "usePlainText" : "true",
                    "customProperties" : [{"name":"code1":"value":"First"}, {"name":"code2":"value":"Second"}]
                    "agentCustomProperties" : [{"name":"Title","value":"Mr"}]
}

Potential Sample Parameters:

  • "Custom.RMA" - "Processing RMA"
  • "Custom.ModelName" - "Supra RZ10"
  • "Custom.ModelNumber" - "234324FJE"
Important
In order for these to work, the Standard Response being used must have the needed field code defined within its template body text.

Response

Any values that are null or empty will not be returned as part of the response.

{
   "body":"Hello Tom, I am John. Goodbye."
}

Autoreplaced Keywords

The following are currently default, built-in data points that UCS automatically replaces if data is available. If data is not available, the default value is 'None'. This data is not user provided in the request.

  • Agent.Signature
  • Agent.FullName
  • Agent.LastName
  • Agent.FirstName
  • Contact.PrimaryPhoneNumber
  • Contact.PrimaryEmailAddress
  • Contact.Title
  • Contact.FullName
  • Contact.LastName
  • Contact.FirstName
  • Contact.Id
  • Interaction.FromAddress
  • Interaction.ToAddress
  • Interaction.TimeZone
  • Interaction.DateCreated
  • Interaction.AttachedData - Only values that are found in either Interaction Attributes or Interaction User Data. If the value does not exist, then a error will be returned in the response.
  • Interaction.Subject
  • Interaction.Id

These values are not active by default. You must add them manually as fields using Knowledge Manager.

This page was last edited on March 24, 2017, at 18:32.
Comments or questions about this documentation? Contact us for support!