Templates

Whatsapp templates are saved whatsapps that are used repeatedly to send whatsapps from the database. They allow users to send quality communications, without having to compose the same text repeatedly.

Creating different templates that are tailored to specific situations lets users choose the right message for the right audience. This increases the quality of the message and the overall engagement rate with the customer.

Access whatsapp templates in developer mode by navigating to Settings app ‣ Technical menu ‣ Whatsapp ‣ Template.

Reply-to field on template.

Default Whatsapp templates

At form the Whatsapp Template tab on an whatsapp template, there is a Whatsapp Default field. In this field, check list will make selected object using this template as default

Reply-to field on template.

Note

Whatsapp templates in Odoo use QWeb or XML, which allows for editing whatsapps in their final rendering, making customizations more robust, without having to edit any code whatsoever. This means that Odoo can use a Graphical User Interface (GUI) to edit whatsapps, which edits the backend code. When the received whatsapp is read by the end user’s program, different formatting and graphics will appear in the final form of it.

Editing whatsapp templates

The powerbox feature can be used when working with whatsapp templates. This feature provides the ability to directly edit the formatting and text in an whatsapp template, as well as the ability to add links, buttons, appointment options, or images.

Additionally, the XML/HTML code of the whatsapp template can be edited directly, via the </> icon. Dynamic placeholders (referencing fields within Odoo) are also available for use in the whatsapp template.

Powerbox

The powerbox feature is an enriched text editor with various formatting, layout, and text options. It can also be used to add XML/HTML features in an whatsapp template. The powerbox feature is activated by typing a forward slash / in the body of the whatsapp template.

When a forward slash / is typed in the body of an whatsapp template, a drop-down menu appears with the following options:

Structure

  • Bulleted list: Create a simple bulleted list.

  • Numbered list: Create a list with numbering.

  • Checklist: Track tasks with a checklist.

  • Table: Insert a table.

  • Separator: Insert a horizontal rule separator.

  • Quote: Add a blockquote section.

  • Code: Add a code section.

  • 2 columns: Convert into two columns.

  • 3 columns: Convert into three columns.

  • 4 columns: Convert into four columns.

Format

  • Heading 1: Big section heading.

  • Heading 2: Medium section heading.

  • Heading 3: Small section heading.

  • Switch direction: Switch the text’s direction.

  • Text: Paragraph block.

Media

  • Image: Insert an image.

  • Article: Link an article.

Navigation

  • Link: Add a link.

  • Button: Add a button.

  • Appointment: Add a specific appointment.

  • Calendar: Schedule an appointment.

Widgets

  • 3 Stars: Insert a rating over three stars.

  • 5 Stars: Insert a rating over five stars.

Basic Blocks

  • Signature: Insert your signature.

Marketing Tools

  • Dynamic Placeholders: Insert personalized content.

Tip

To use any of these options, click on the desired feature from the powerbox drop-down menu. To format existing text with a text-related option (e.g. Heading 1, Switch direction, etc.), highlight the text, then type in the activator key (forward slash) /, and select the desired option from the drop-down menu.

Powerbox feature in the whatsapp template.

See also

Using dynamic placeholders

XML/HTML code editor

To access the XML/HTML editor for an whatsapp template, first enter developer mode. Then, click the </> icon in the upper-right corner of the template, and proceed to edit the XML/HTML. To return to the standard text editor, click the </> icon again.

HTML editor in the whatsapp template.

Warning

The XML/HTML editor should be accessed with caution as this is the backend code of the template. Editing the code can cause the whatsapp template to break immediately or when upgrading the database.

Dynamic placeholders

Dynamic placeholders reference certain fields within the Odoo database to produce unique data in the whatsapp template.

Example

Many companies like to customize their whatsapps with a personalized piece of customer information to grab attention. This can be accomplished in Odoo by referencing a field within a model by inserting a dynamic placeholder. For example, a customer’s name can be referenced in the whatsapp from the Customer field on the Sales Order model. The dynamic placeholder for this field is: {{ object.partner_id }}.

Dynamic placeholders are encoded to display fields from within the database. Dynamic placeholders can be used in the Body (Content Tab) of the whatsapp template. They can also be used in the fields present in the Whatsapp Configuration tab, the Subject of the whatsapp, and the Language.

To use the dynamic placeholders in the Body of an whatsapp open the powerbox feature by typing in / into the body of the whatsapp template under the Content tab. Scroll to the bottom of the options list, to Marketing Tools. Next, select Dynamic Placeholder. Then select the dynamic placeholder from a list of available options and follow the prompts to configure it with the desired corresponding Odoo field. Each dynamic placeholder will vary in configuration.

Using dynamic placeholders in an whatsapp template.

Note

Each unique combination of Fields, Sub-models and Sub-fields creates a different dynamic placeholder. Imagine it as a combination to the field that is being created.

To search the available fields, simply type in the front-end name (on user-interface) of the field in the search. This will find a result from all of the available fields for the model that the whatsapp template is created for.

Warning

Customizing whatsapp templates are out of the scope of Odoo Support.

Rich text editor

A rich text editor toolbar can be accessed by highlighting text in the whatsapp template. This can be used to change the heading, font size/style, color, add a list type, or a link.

Rich text editor in the whatsapp template.

Resetting whatsapp templates

Should the whatsapp template not work because the code has been altered it can be reset to restore it back to the out-of-box default template. Simply click on the Reset Template button in the upper left-hand of the screen and the template will be reset.

Resetting the whatsapp template.