The Conversation API allows you to send template messages in which all or some of the message content is pre-defined. Message templates can also contain dynamic content which is populated when sending the message using template parameters.
The Message Composer is a tool on the Sinch Customer Dashboard that helps with template creation and management. You can use the Message Composer to create new omni-channel message templates.
To create a new omni-channel message template using the Message Composer:
Log in to the Sinch Customer Dashboard.
Select Conversation API from the left menu and select the Message Composer option. The Message Composer page is displayed.
In the Message templates section, click NEW TEMPLATE.
The Create message template dialog box is displayed: From the Template type drop-down list, select Omni-channel template and then click CREATE.
The Create message template form is displayed:
Enter a Template Name, select a Default Language, select the Region of your template, and select the Template type. Note the following:
The Template Name is returned in the description field of API calls made to the template-specific Conversation API endpoints.
The Default Language defines which translation will be used when sending template messages without specifying a template language in the API call.
Templates are only stored in the Region in which they're created and can only be used by Conversation API apps created in the same region.
The Template Type is the message type that your template will correspond to. You can update the Template type after completing this form.
You may Select a pre-defined template to work from, which will allow you to continue the template creation process with some options configured automatically. These options can be updated later in the process. Select a pre-defined template by using the Select a pre-defined template drop-down list or by using the BROWSE TEMPLATES button.
When the form is complete, click CREATE.
A message confirming that your template has been created is displayed:
Click GO TO TEMPLATE to continue the configuration process.
Your template's page is displayed: Note: The template's ID is displayed below the template's name.
Ensure that you are configuring a template for the appropriate message type: To change message types, select a new message type in the Choose Message Type section of the page.
The contents of a message template are associated with specific language translations. Note: You can configure different content for different languages and store them in the same omni-channel template. Ensure that you are configuring content for the appropriate Language: To change the current template language option, select a new language from the Add language drop-down list. The language is added above the drop-down list. You can select any of the languages currently assigned to your template.
Begin adding content to your template using the editor. Note: Upon template creation, the editor is automatically set to Form. Depending on the Template type you selected, different options will be available to you in the editor: Depending on which field you are editing, you may be able to add variables in the form of ${YOUR_variable_name} . These variables can be populated dynamically by using the parameters field when sending messages using this template. Note: You can use the Code editor to create template content using code samples, or you can use the Form or Visual editors to compose a message and then extract the snippet from the Code editor. This snippet can then be used to populate the message field of non-template messages.
If you added variables to any fields, they will be displayed in the Samples for variables section under the Previewer: You can populate these with sample values. These values are displayed in the Previewer, as described in the following step. Note: The Samples for variables section is only for preview purposes, and does not affect the actual content of your template.
To see how your message will display on the various Conversation API channels, use the Previewer. There, you'll see your message with your configured content as it would appear on the channel selected in the drop-down list. If you provided sample values for any variables, they are included in the preview: To change the channel displayed in the previewer, simply click the drop-down list and select a new channel:
Once you are pleased with how your template message will appear on all the relevant channels, click SAVE MESSAGE TEMPLATE in the upper-right corner of your template's page: A notification indicating that your template has been saved is displayed.
Your omni-channel message template has been successfully created. See our developer documentation to learn how to send template messages using the Conversation API.
... View more