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}
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]
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]
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.