When you create messaging components for service reps to use in enhanced Messaging channels or Enhanced Chat, you can use formulas to add dynamic, session-specific content to the component.
Required Editions
| View supported editions. | |
This article applies to:
|
Enhanced In-App Chat, Enhanced Web Chat v1, Enhanced Web Chat v2, Enhanced WhatsApp, Enhanced Facebook Messenger, Enhanced Apple Messages for Business, Enhanced LINE, and Bring Your Own Channel |
This article doesn’t apply to:
|
Standard and Enhanced SMS channels |
Formulas fall into two categories: formula templates and sObject formulas. You can use both to customize different parts of a messaging component.
- Formula templates consist of a text body with possible merge fields. When a message that includes a formula template is sent, the merge fields are replaced with contextual information such as an order number or customer name. Use formula templates to customize the Text version of a messaging component.
- sObject formulas are object-specific formulas that create field values based on contextual data. Use sObject formulas to customize any supported format of a messaging component except for Text.
Formula templates and sObject formulas can contain both plain text and contextual data from a data source. Two types of data sources are supported: constants and parameters.
| Data Source | Definition | How to Reference |
|---|---|---|
| Constant | Metadata that is defined as part of the messaging component. Constants support multiple data types, including text, URL, and image. |
In this syntax, replace |
| Parameter | Metadata that is defined as part of the messaging component, with the data that it contains provided dynamically when a message is rendered. Parameters support the same data types as constants and references to records such as cases or products. |
In this
syntax, replace |
- Customizing Messaging Components with Formula Templates
When you create a messaging component, you can add and configure one or more formats to control the component’s appearance in different Messaging channels. The default format of messaging components is Text, which is a plain text version of the component. - Customizing Messaging Components with sObject Formulas
Use sObject formulas to control the way that your messaging components appear in any non-Text format. - Supported Functions in Messaging Component Formulas
Before you customize components in the Messaging Component Builder, review which functions are and aren’t supported.

