The Content Template Builder Console guides you through the content creation process to create and manage templates across channels like WhatsApp, Facebook Messenger, and SMS. With Content Templates, you can ensure that your customers receive an engaging messaging experience in the channel they prefer. The Content Template Builder delivers a consistent experience on all channels by utilizing universal templates that support the shared capabilities of each channel.
If you do not have the 'Messaging' product in your develop sidebar, go to Explore Products, and pin the Messaging product.
Click on the Messaging product in and the dropdown select 'Content Template Builder'.
Click on 'Create new' to start creating a new template in the Content Template Builder.
Not all template types available in the Content API are currently available in the Content Template Builder. We will be iteratively adding more template types over time. If you would like to use twilio/card
, twilio/list
, or twilio/location
templates now, please use the Content API.
Supported channels will be displayed on the template listing page and template detail pages.
Each Content Type has its own unique fields. For more information see the Content Types Overview section. For this example we will be using a twilio/call-to-action
template.
Body: What will appear as the message within the template
Add buttons: The action buttons that will be attached to the template. There can be up to 2 buttons per CTA template.
Variables can be added in Content Template Builder with the "+Add Variable" button shown in the image below or by typing or copying in text with the right notation of {{}} brackets.
To delete a variable, use your keyboard's delete/backspace keys.
Variable samples are required in templates that contain media and certain templates that require WhatsApp approval. We recommend supplying samples for all variables so that your messages have a placeholder value if a variable is not defined at send time. Samples can be set upon "Save" or "Save and submit to WhatsApp Approval" within Twilio's sample modal shown below. Samples may be required or optional depending on the template type and whether or not you submit for WA approval.
You can have up to 100 variables in a template. Templates submitted to approval by WhatsApp must maintain a certain non-variable word to variable ratio. That ratio is 2x+1 words for every x variables.
For templates sent out of session through WhatsApp the following rules apply. For additional tips on how to create templates and avoid template rejections, please refer to this guide.
For templates sent out of session through WhatsApp the following rules apply.
Content variables need to be in sequential order. They can be in a non-sequential order within a template, but variable definitions should not skip over integers. For example, Meta does not allow {{1}} words {{3}} but they allow{{1}} words {{3}} words {{2}}.
"body": "Hi {{1}}, Your flight will depart from gate {{3}}. Please reply Stop to unsubscribe."
"body": "Hi {{1}}, Your flight will depart from gate {{2}}. Please reply Stop to unsubscribe."
Content variables cannot be right next to each other without a sample. Meta considers variables separated by only a spaces as next to each other. There additionally needs to be characters separated by a space between variables.
"body": "Hi {{1}} {{2}}, flight will depart from gate {{3}}. Please reply Stop to unsubscribe."
"body": "Hi {{1}} and {{2}}, flight will depart from gate {{3}}. Please reply Stop to unsubscribe."
Content variables cannot be the start or end of a body string without a sample. Meta considers variables strings ending in a variable + punctuation as a variable at the end of a string. There will need to be extra text after the variable.
"body": "Hi {{1}}, flight will depart from gate {{2}}."
"body": "Hi {{1}}, flight will depart from gate {{2}}. Please reply Stop to unsubscribe."
Templates cannot have too many variables relative to the message length. The general rule observed for this is for every 'x' variables there needs to be 2x+1 non variable words. Words being defined as characters separated by a space.
"body": "Hi {{1}}, gate {{2}}. Thank you."
"body": "Hi {{1}}, Your flight will depart from gate {{2}}. Thank you."
Samples are required for any of the validations above. They are also required in Media and CTA URL links. If a variable is present in the template for a Media or CTA URL link, all text variables will require samples regardless of whether the text variable triggers any of the above validations or not.
Save: Saves and creates the template and returns to the home screen. The template will now have a template SID starting with HX that you can reference in your send requests.
Save and submit for WhatsApp approval: Saves and creates the template and returns to the home screen. The template will now have a template SID starting with HX that can be used for sending. This button also submits the template for WhatsApp review. Meta typically processes approvals within an hour but some approvals take up to 1 business day. You will need to select a template category upon submitting a template for review.
Cancel: Deletes the template and does not save it. You will be returned to the home screen after clicking this button.