Prerequisites
- A business in your project to build the content in. A business you use only for building templates works well.
- For a trigger template, the event it listens for. See Send messages when something happens in your product.
1. Build the campaign
Create an embed for the business and build the campaign the way a business would, with the steps and messages you want every business to start from. Write the messages so they work for any business. Use variables such as{{ business.name }} and {{ customer.first_name }} rather than typing a name.
See How personalization variables work.
2. Make it a template
- In the dashboard, open Resources > Businesses and select the business.
- Find the campaign and select Make template.
3. Name and enable it
Give the template a title and description that tell a business when to use it, then enable it. A new template is disabled until you do. Once enabled, the template is offered to every business in the project when it creates a campaign in the embed.4. Use it for a business
A business can pick the template itself in the embed. To create the campaign for a business from your own product instead, use the API:id, list the enabled templates with
GET /campaign_templates.
Trigger templates
The steps are the same, with these differences:- Build a trigger instead of a campaign, then select Make template on the trigger. It appears under Resources > Trigger Templates.
-
List enabled templates with
GET /trigger_templates. -
Create a trigger for a business with:
The response is a draft trigger. It does not run until it is activated.
Email templates
To offer a single email design rather than a whole campaign:- Create it under Resources > Project Email Templates, then enable it. From the same page you can copy a template you built in test mode into your live project.
-
List them with
GET /project_email_templates. -
Copy one into a business with:
The response is the business’s new email template.
Update a template
Changing a template affects businesses that use it from then on. Copies that businesses have already made are not changed. To change the title or description shown to businesses, edit the template in the dashboard or send the new values toPOST /campaign_templates/:id or POST /trigger_templates/:id.
Related
- How pre-built templates work for why using a template makes a copy.
- How personalization variables work for writing messages that work for every business.