Broadcast Transformer
Overview
Broadcast transformer converts a single message to multiple messages. Orchestrator send a list of user with there messages to be sent in a single XMessage. This transformer will generate mutiple xMessages based on the list of users & messages.
It then pushes these messages to process outbound topic. Orchestrator gets to decide if any other change is required for these messages or to send it to directly to user via outbound.
Configuration
A bot will work with a broadcast transformer when we mention the type of the transformer as broadcast. When a bot is added, certain configuration will be added with this bot. This configuration needs to be changed for broadcast transformer. A sample broadcast configuration is given below
Below are the brief details of each parameters included.
id: id of broadcast transformer
meta: Data related to message that will be to users.
body: Message template text with parameters in it. Parameters should be included in the template in as "${name}".
type: Type of message template. Eg. JS_TEMPLATE_LITERALS
params: Array of parameters provided in user segment. These parameter's values from user segment will be replaced in the message template text.
type: Type of transformer. Eg. broadcast
This configuration will be used when create a conversation logic. Click here to see the conversation logic api.
User segment
User segment needs to be defined to broadcast a message to users. This user segment must have a phoneNo parameter in it. The user segment can have multiple parameters in it, these parameters will be used later to be replaced in the message template text before sending the message to users.
Below is a sample of user segment.
Last updated