From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


Chat Directives

In Agent Desktop, agents send audio, video, image, and other types of content to integrated messengers by clicking controls in the chat interface. Chat directives provide an alternate way to send content to messengers by using text-based instructions, called directives, through the:


Supported Directives


Format


A directive command consists of a forward slash followed by the directive, a set of mandatory parameters and a set of optional parameters.

Preferred format for directives attachment, location, and sticker
/directive : <mandatory parameter1>, <mandatory parameter2> ...[, optional parameter1, optional parameter 2] ...
Format for the buttons directive and backward compatibility with attachment, location, and sticker
/directive <mandatory parameter1> <mandatory parameter2> ...[optional parameter1 optional parameter 2] ...



Info.40x40.png Separating a directive from its parameters with whitespace is allowed for backward compatibility. The recommended separator is a colon, except for the buttons directive which only accepts whitespace between the directive and its parameters and only accepts whitespace between its parameters.



Formatting Rules


  • Directives are case sensitive.
  • Separate a directive from its parameters with a colon or whitespace.
  • Separate multiple parameters with commas.
  • Enclose string parameters in double quotes.
  • Add required parameters before optional parameters.
  • An optional parameter value may be an empty string.



Info.40x40.png

You can add text before and after a directive. When you do this, the message is received in three parts:

  1. the leading text
  2. the directive and its content
  3. the ending text


The order in which each message part is received is determined by the type of messenger receiving the message. Message parts may not be received in the order sent.

Attachment, location, and sticker directives which require multiple messages are recorded in the chat transcript and activity history in the same order as sent to the customer.



Examples


Example location directive
/location : 1.23, 5.67, "Bright Pattern", "611 Gateway Blvd., South San Francisco, CA 94080" 
Example attachment directive
/attachment : https://example.com/movie.mp4, video
Example sticker directive
/sticker : sticker35, , viber
Example of a location directive sent between leading and ending text.
This is the company's location:  /location 37.524271, -122.304199 Thank you for using our location service.


See also:



Next >