Create Predefined Response

This API creates a predefined response.

Note
  • A maximum of 500 predefined responses can be created in the system.

  • The response text can be up to 1500 characters with UTF8 encoding.

  • Group names can be up to 100 characters with a maximum of 10 groups per response.

  • Title names can be up to 100 characters.

  • The value of the contentType parameter can be up to 85 characters.

  • At least one group name has to be specified in a response.

  • Groups are classified into two, namely:response(default) and signature.

URL:

https://<ServerIP>:<Port>/ccp-webapp/ccp/predefinedResponse/

HTTPS method:

POST

Example XML response (plain text predefined response):

<response>
  <title>A summary of the response</title>
  <text>The text of the response. This can be up to 2000 utf8 characters long</text>
  <type>response</type>
  <groups>
    <group>group 1</group>
    <group>group 2</group>
    <group>group 3</group>
  </groups>
</response>
Example XML request payload (HTML type predefined response):
<response>
  <title>A summary of the response</title>
  <text><![CDATA[<!DOCTYPE html><html><head><title>This is a sample HTML response
  </title></head><body><h1>My First HTML</h1></body></html>]]></text>
  <contentType>text/html</contentType>
  <type>response</type>
  <groups>
    <group>group 1</group>
    <group>group 2</group>
    <group>group 3</group>
    <group>group n</group>
  </groups>
</response>
Parameters:

title (required) : a short summary of the response.

text (required) : the text of the response. If the text content is HTML, you must place the HTML text inside a CDATA section (<![CDATA[...html...]]>).

contentType (required for email/HTML predefined responses, optional for others): the type of text included in the response. The value for this parameter is freeform. For example, you could use a value of text/plain when the response text includes unformatted, readable text (such as for chat predefined responses). You must use a value of text/html for email predefined responses when the response text includes information formatted with html tags.

type (optional): the type of the template. This can have two values:
  • response: Indicates a response template type. This is the default value when the parameter is not specified.

  • signature: Indicates a signature template type which is automatically appended to the end of outgoing emails.

groups (required) : the list of groups associated with the response.

HTTPS response headers:

201 Created (the created URL is returned with the response)

400 Bad request (if the input is not as per the defined criteria)

For more information, see HTTPS responses.

Note

In predefined responses of type signature, a specific variable ${agent_alias} can be inserted as part of the text attribute. All occurrences of this variable will automatically be replaced with the actual alias of the Finesse agent when the signature is added to an email reply from the multi-session reply gadget. In cases where the agent does not have an alias configured, all occurrences of this variable will be replaced with the agent ID instead.