Skip to main content
Skip table of contents

Format Salesforce data (Legacy)

The value coming from Salesforce will come with the Data Type. Default Data Formatter will format Salesforce data throughout the document. If you need to format one field in the document differently with the rest, create a Custom Data Formatter and apply that to the field in the template.

Understanding how data is formatted initially

By default, data format will follow the end-user's default locale or from their personal setting in Salesforce. The patterns, symbol for grouping numbers, separating decimals and abbreviation for months and days are locale's properties.  

In general, you don't need to edit locale in data formatter. It's good to know which locale users are using and understand how it influences the data format. In case you want to customize locale. The Locale value should be a combination of an ISO-639 language code and an ISO-3166 country code, joined by a hyphen or an underscore (e.g. "en-US" or "en_US").

The below instructions are how to customize the data formatter to partly or fully override locale's format.

Edit the Default Data Formatter

The default Formatters will identify how data will be formatted thorough the documents. See instructions how to change the default format below:

Add Custom Data Formatter

Occasionally you want to format data from a specific element differently than the rest of the document. To achieve that, you need to create a Custom Data Formatter and apply it to the Content Format attribute of that element in the template.

Create a Custom Data Formatter

In Settings tab → Salesforce DataCustom Data Formatter

Click + and select the Formatter you want to add

image-20240109-074643.png

Give the name for the new Custom Formatter

Format the pattern and other properties as you wish, following the same instruction with editing the Default Formatters above.

image-20240109-074652.png

Apply Custom Data Formatter to element

In the template, select the element you want to have special format

In the Tags on the right pane, select Attributes

In Content Format attribute, click ... button to see different formats and select one. If custom data formatter is added manually,  you need to use the single quotation, for example  'NewCurrencyFormatter'.  'NewCurrencyFormatter'

image-20240109-074659.png

Now the dynamic data coming from Salesforce will be formatted with the Custom Data Formatter

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.