Format Delpha Conversation messages
Formatting rules
The Delpha messages can contain more than simple texts. By inserting special tags, you can display dynamic and formatted messages. Tags can be used to modify text style, add icons, add images, add hyperlinks, or insert a variable value. The tags can be used on any message displayed to the user such as:
In the builder, via the message/question/answer display text field.
Formatted message displayed on Delpha
In the apex code, while creating dynamic answers.
Supported Tags
Insert Variables / Record Links
Add Variable
Default or custom variable defined in the builder can be displayed in the bot using the following tags: Tag: {!VariableName} Example: {!CurrentRecordId}
Display fields associated with a record variable
Tag: {!VariableName.FieldName} Example: {!CurrentRecordId.Email}
Display fields associated with the related record
Tag: {!VariableName.RelatedObject.FieldName} Example : {!CurrentRecordId.Contact.Name}
The associated records can be accessed by chaining them as shown above, and you can go on like {!CurrentRecordId.Contact.Account.Name}.
Add Record Link
Tag: [record Id= value]display text[/record] The value can either be hard-coded or a variable, as shown below: Example:[record id=0031D00000aIxZtQAK]Andy Young[/record] Example:[record id={!targetRecordId}]Andy Young[/record]
Format text
Bold Text
Tag: [b]Bold Text[/b]
Example: Discover [b]California[/b]
Line Break
Tag: [br/]
Example: Discover [br/]London
Italic Text
Tag: [i]Italic Text[/i]
Example: Discover [i]Prague[/i]
Underline Text
Tag: [u]Underlined Text[/u]
Example: Discover [u]Paris[/u]
Add Color
Tag: [color=value]Colored Text[/color]
The value can either be color name or hexadecimal code as shown below:
Example: [color=green]Hello World![/color]
Example: [color=#FF0000]Hello World[/color]
Insert Resources / Links
Add Icon
Tag: [icon]IconType:IconName[/icon]
Example: [icon]standard:announcement[/icon]
Add Image
Tag: [img]Image Link[/img]
Example: [img]https://delphaimage.png[/img]
Add Image and adjust width
Tag: [img]https://img.png[/img][img width=50] Note: Currently, Salesforce doesn't consider the image height attribute added in the tags. However, the image scaling is respected during rendering.
Add External Link
Tag: [url]external link[/url]
Example: [url]https://delpha.io[/url]
Add external link to a display text
Tag: [url=external link]display text[/url]
Example: [url=https://delpha.io]AI for Productivity[/url]
Add an external link to an image
Tag: [url=external link][img width=50]Image link[/img][/url] Example: [url=https://delpha.io][img width=50]https://img.png[/img][/url]
For security reasons and to avoid vulnerabilities such as XSS, we only support our tags.
Last updated
Was this helpful?