Skip to main content

Text campaigns

Typically, bot scripts are used for processing incoming requests: the bot is launched only when the client sends a message in a channel where the bot is published: in a messenger, social network, or chat widget.

Tovie Platform bots can also launch text campaigns to clients the bot talked to before. When you launch a campaign, the bot does not wait for the first message from a client and initiates the dialog itself. For example, the bot can send information on promotions and discounts, changes in your business operations, or announcements.

Text campaigns are supported in text-based channels only. You can also launch campaigns in the phone channel: refer to the Call campaigns section to find out more.

Campaign creation

To create a new text campaign:

  1. Open your bot project, go to the Text campaigns page and click Create text campaign.
  2. Configure the campaign settings and content.
  3. Launch the campaign.

Settings

  1. Fill out the campaign name or leave the default one.

  2. Select the channel where you want to launch the campaign. You can select any text-based inbound channel where the bot is already published.

  3. In the Client list field, select one of the options:

    • All channel clients. This will target the campaign at all channel clients existing at the time when the campaign is launched.
    • An existing list of clients. This will target the campaign only at clients from this list.
  4. If necessary, schedule the date and time when the campaign should start and configure special settings: the interval between sending messages and the number of message threads.

    How special settings work

    During a campaign, the client list is divided into groups of 100 people. Each group is served by one dispatch thread. The higher the number of threads, the more clients will receive the message simultaneously.

    On the other hand, you can separately configure the time interval between dispatches. The higher this interval, the less frequently messages will be sent to clients.

    By tweaking these two parameters, you can spread out the campaign lifespan in a way that suits you:

    • When you have a large client list and wish to be done with the campaign as quickly as possible, consider increasing the number of threads.
    • If your campaign script allows clients to switch to an agent, increase the dispatch interval to reduce the possible one-time load on your support center.

Content

Here you can configure the campaign content using the built-in editor. In the campaign, you can send any number of the following bot reactions:

  • Text — a text message in the chat. Messages can be formatted using HTML markup.
  • Image — an image that will be displayed in the chat. You can provide a link to an image available online or upload your own.
  • Button group — one or several buttons. For each button, you can customize the text and (optionally) the link opened when the button is selected.
info
  • Applying HTML markup and sending images or buttons is not available in all channels. Refer to Channel features and restrictions to find out whether the necessary feature is supported.

  • If the features of built-in bot reactions aren’t enough for you, you can create your own. This is an advanced feature only available for the Chat API channel.

Launch

After configuring the campaign settings and content, click Create text campaign. This will either launch it immediately or schedule it for the specified time.

Campaign control

When the text campaign is launched, you can suspend it or terminate it prematurely . Suspended campaigns can be resumed at any moment.

tip

Scripted text campaigns also support more fine-grained control mechanisms: canceling and postponing messages for specific clients only.

Through the  context menu, any campaign can be:

  • Duplicated. When duplicating a text campaign, you can edit any of its settings and content: for example, launch it in a different channel.
  • Edited. You can change any settings except for the channel type and the client list before you start the text campaign. Text campaigns already started cannot be edited.
  • Deleted. If you delete a campaign in progress, it will be terminated automatically. The report for this campaign will no longer be accessible.

Campaigns targeted at clients from a list

Rather than send campaigns to all channel clients, you can target them at clients from a predefined list. You will likely need this feature if:

  • You want to target your campaign at a subset of the channel audience filtered by the necessary criteria.
  • You want to employ cold marketing to attract clients who haven’t interacted with the bot before.

To target the campaign at clients from a list, create a list of clients in advance, then specify it during campaign creation.

Campaign script coding

When you set up the campaign content through the built-in editor, you are limited to three types of bot reactions. If overcoming this restriction is important for your needs, you can make use of a more advanced way to set up a campaign: code it as a separate script branch inside the bot script.

In such campaigns, you can make use of all Tovie DSL features: manage the dialog context to handle client reactions, implement business logic in JavaScript. Several methods are specially designed for text campaigns:

Script example

In the script code, add a separate state triggered by an event that will activate the bot when the campaign is launched. This event will occur in the channel and will be handled in the script via the event! tag. Add the campaign content to the same state.

tip
You can pick a name for the event yourself. Event names can contain only Latin characters and numbers, and shouldn’t coincide with system event names.

You can also implement other states to configure the bot behavior for different client responses. In any of these states, use the script tag to call the $analytics.setTextCampaignResult method and assign a result to the campaign. This will allow doing analytics over the campaign and assessing how effective it is.

The example below shows a campaign script triggered by textCampaignEvent. If the client’s answer is matched by one of the intents, the campaign will be assigned the appropriate result.

state: TextCampaign
event!: textCampaignEvent
a: A 10% discount on all items if you register a bonus card! Are you interested?

state: Success
intent: /yes
a: Here’s your registration link: https://example.com
script:
$analytics.setTextCampaignResult("Campaign succeeded");

state: Failure
intent: /no
a: It’s a pity. Bye!
script:
$analytics.setTextCampaignResult("Campaign failed");

Event setup

When you create a text campaign for which you have set up a script, you don’t need to use the built-in campaign editor. Instead, fill out the Event name that will trigger the appropriate state.

tip
You can configure the campaign content and the event name at the same time. In this case, starting the campaign will make the bot execute the reactions from the editor first, then handle the event in the script.

Campaign list

All campaigns are displayed in a list sorted by the time of creation. The following information on each campaign is available:

  • Name.

  • The date of creation.

  • An ID unique within the account (for example, #169).

    tip
    Click the ID to quickly navigate to analytics over dialogs started with this campaign.
  • Real-time progress with a distribution of messages into segments:

    • Sent messages and their percentage of the total number of clients.

    • Postponed messages.

    • Canceled messages.

    • Messages not sent due to a technical error.

  • Channel type.

  • The name of the list of clients whom the campaign targets.

  • The start and completion date and time.

  • Status.

Campaign reports

You can view and download reports on the results for each campaign. Reports include aggregate statistics over sessions based on their results:

If the $analytics.setTextCampaignResult method was called during the campaign, the session will fall into a group named after the value passed into the method. Otherwise, the campaign result value will be No result.

Campaign statuses

A campaign can have one of the following statuses:

StatusDescription
CreatedThe campaign has been created, the list of clients is still being processed.
ScheduledThe list of clients has been processed, the campaign will start at the specified time.
In progressThe campaign is in progress at the moment.
PostponedThe campaign was postponed for some clients.
CompletedThe campaign is completed.
ErrorThe campaign has not started due to problems when processing the list of clients.