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.

Formatted message displayed on Delpha

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

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]

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]

Add Icon

Tag: [icon]IconType:IconName[/icon] Example: [icon]standard:announcement[/icon]

Delpha currently supports Salesforce-Lightning design icons.

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.

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

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

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?