Attribute Message
This page describes when to use and find an attribute message type
Last updated
This page describes when to use and find an attribute message type
Last updated
Attribute message allows you to define message structure at runtime during the conversation rather than design time.
You want to use attribute message when you don't know exact message structure when designing your conversation. This is typically happens when you need to retrieve data for your message structure from external services or as a result of action.
Navigate to the Message Editor and create a Custom Message. Copy the XML snippet at the bottom of this page into the black box, or select attribute-message
from the dropdown.
context_name
- name of a context where to look for an attribute followed by dot .
If context is omitted then conversation engine will assume user
context.
attribute_name
- attribute which contains XML definition of a messages.
Pay attention that you do not need to use attribute syntax here (with curly braces {attribute}
) to specify which attribute you want to use.
Attribute which you will use to construct your attribute message must be in a specific format:
Root element must be message
with attributes disable_text
and hide_avatar
specifying whether you want these to be true or false
In child elements you put XML definition of any other message(s) that OpenDialog supports. Below you can find examples of what it might be.
Text message
Rich message followed by text message
Image message followed by list message followed by button message
Attribute messages really shines when you need to construct your message dynamically. Let's walk through some examples.
TBD
TBD