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:

  1. In the builder, via the message/question/answer display text field.

3.png

1.png Formatted message displayed on Delpha

  1. In the apex code, while creating dynamic answers.

3.png

Supported Tags

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}

Tag: {!VariableName.RelatedObject.FieldName} Example : {!CurrentRecordId.Contact.Name}

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] image.png

Line Break

Tag: [br/] Example: Discover [br/]London image.png

Italic Text

Tag: [i]Italic Text[/i] Example: Discover [i]Prague[/i] 3.jpg

Underline Text

Tag: [u]Underlined Text[/u] Example: Discover [u]Paris[/u] image.png

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] image.png Example: [color=#FF0000]Hello World[/color] 1.jpg

Add Icon

Tag: [icon]IconType:IconName[/icon] Example: [icon]standard:announcement[/icon] image.png

Delpha currently supports Salesforce-Lightning design icons.

Add Image

Tag: [img]Image Link[/img] Example: [img]https://delphaimage.png[/img] image.png

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.

Tag: [url]external link[/url] Example: [url]https://delpha.io[/url] image.png

Tag: [url=external link]display text[/url] Example: [url=https://delpha.io]AI for Productivity[/url] image.png

Tag: [url=external link][img width=50]Image link[/img][/url] Example: [url=https://delpha.io][img width=50]https://img.png[/img][/url]

Last updated

Was this helpful?