Abstract Message

The abstractMessage object acts as a container for various message types within the Bring Your Own Bot (BYOB) API. It encapsulates essential metadata like id, messageType, inReplyToMessageId and specific content payloads like staticContent, choices, or form. It provides a structured way to represent and manage diverse messages exchanged in bot conversations, including text, interactive choices, and forms, along with references to Salesforce records.

Property NameTypeDescriptionRequired
abstractMessageobjectThe message details.
abstractMessage.messageTypestringThe message type for the interaction. Set this value to StaticContentMessage. For more information on messageType, see Message Types and Message Format Types.
abstractMessage.staticContentobjectThe details for the static content. For messages, set formatType to Text, and provide your message content for text.
abstractMessage.idstringA unique ID for the interaction. This value must match the entryPayload.id value in this payload.
abstractMessage.inReplyToMessageIdstringHolds an identifier (ID) of a previous message to which the current message is a reply. It’s used to maintain context or thread information in a conversation.
abstractMessage.referencesarrayAn array or list that contains references to related records or entities to link conversation entries to specific data within Salesforce or other systems.
references.recordIdstringWithin the references array, each item has a recordId property. This property holds the unique identifier of a specific record that is related to the conversation or message.
references.idstringWithin the references array, each item has an id property. This is an identifier for the specific reference itself to track or manage the relationship between the message and the referenced item.
abstractMessage.ChoicesobjectSpecifies how the choices will be presented to the end user.
choices.formatTypestringSpecifies how the choices will be presented to the user. Valid values are Buttons, QuickReplies, and Carousel. It defines the visual layout or style of the choices.
choices.itemsarrayAn array that holds the individual choice options available to the end user. Each item in this array represents a single selectable choice within the interaction.
choices.imagesarrayAn array that contains image details associated with the choices. These images can be used to enhance the visual appearance of the choice options, displaying them alongside or within individual choice items.
images.assetTypestringSpecifies the type of the image asset. For example, for Carousel payload, the value is ImageAsset.
images.descriptionstringA textual description of the image.
images.idstringA unique identifier for the image asset. This ID is used to reference and manage the image within the system.
images.mimeTypestringThe MIME type of the image file. For example, image/png or image/jpeg indicates the format of the image.
images.assetUrlstringThe URL where the image asset can be accessed. This is the location of the image file.
images.referenceIdstringThe reference ID that links the image to another entity or item. This is used to associate the image with a specific choice option.
choices.itemsarrayAn array of items within a choice message, specifically used in the Carousel formatType. Each item in this array represents a single item or card that can be selected from the carousel. Each item can have its own title, subtitle, image, and interaction items.
items.titleItemobjectAn object within each item in the items array, providing the details of the title-related information for that item. It includes properties like the title text, subtitle, image, and related identifiers.
titleItemobjectAn object that can be nested within other objects to describe the title details of an item or option. It contains various properties to define and display title information effectively.
titleItem.itemTypestringIndicates the specific type of title item, which can be TitleItem for basic text titles or TitleImageItem for titles with associated images. It determines how the title will be presented.
titleItem.secondarySubTitlestringAn additional subtitle displayed under the main subtitle, providing further details or context related to the item’s title. It can be optional or null if not needed.
titleItem.titlestringThe main title text for the item or option. This is the primary heading or label for the item.
titleItem.subTitlestringA secondary title or subtitle displayed below the main title, adding more descriptive information about the item.
titleItem.tertiarySubTitlestringA third-level subtitle, used to provide even more detailed information or context under the main title and subtitle. It’s optional and can be set to null if not needed.
titleItem.referenceIdstringAn ID or reference that links the title item to another entity or record in the system. It helps in establishing relationships or referencing external data associated with the title item.
titleItem.imageSubTitlestringA subtitle specifically associated with an image. If the titleItem includes an image, this subtitle provides a caption or description for that image.
titleItem.imageIdstringThe unique ID of an image associated with the title item, especially in TitleImageItem types. This ID is used to reference and retrieve the corresponding image.
items.interactionItemsobjectAn array within each item of the items array (specifically used in the Carousel formatType). It contains interactive elements associated with each item in the carousel. These elements can be buttons or options that the user can interact with.
interactionItems.itemTypestringSpecifies the type of interaction item within the interactionItems array. This determines how the item behaves or what it represents. For example, a button or hyperlink.
interactionItems.titleItemobjectAn object within each interactionItem that provides the title or label information for that specific interaction element. It can contain the text to display on a button or the title of a link.
interactionItems.optionIdentifierstringA unique identifier for a specific option within the interactionItems array. This is used to identify the option the user selects.
interactionItems.optionIdstringHolds an additional option identifier. It’s also to identify the option that the user selects.
abstractMessage.formobjectRepresents a form object that is part of an abstractMessage. It encapsulates all details of a form that can be sent to the user in the context of a chatbot interaction. This form can contain input fields, titles, sections, and images.
form.formTypestringSpecifies the type or format of the form. A valid value is Inputs which indicates that the form will collect data through input fields.
form.formTitleobjectAn object that contains information about the title of the form. This will be the main heading or label for the form presented to the user.
form.formatTypestringSpecifies the type or format of the form. Valid value is MessageDefinition.
form.parametersobjectThe parameters relevant to the form.
form.sectionsarrayAn array or list of sections within the form. Each section can contain input fields, instructions, or other elements that logically group parts of the form.
form.imagesarrayAn array or list of images associated with the form. These images can be used for visual cues, instructions, or to enhance the form’s presentation.
form.messageDefinitionNameOrIdstringRepresents the messaging component ID. For more information, see Create a Secure Form.
form.targetLocalestringThe target language or locale for the form.
formTitle.itemTypestringSpecifies the type of the title item used for the form title. Valid value is TitleItem.
formTitle.titlestringThe actual textual title of the form, which will be displayed to the user as the form’s main heading.
sections.sectionTypestringSpecifies the type of section within a form. It indicates how the inputs are structured and displayed in that specific section. For example, if it’s a single input or multiple inputs. Valid value is SingleInputSection.
sections.inputobjectAn object that contains details of the input fields or controls within a section of the form. It holds properties defining the type of input (text, selection), its ID, label, and whether it is required.
sections.submitFormbooleanA boolean value indicating whether submitting the form is enabled or triggered by the input in this section. If true, submitting the form occurs after this section’s input is completed.
input.inputTypestringSpecifies the type of input field or control. It determines what kind of data the user is expected to enter. For example, text, number, or date. Valid value is TextInput.
input.idstringA unique identifier for the input field or control. This ID is used to reference and manage the input data when submitting the form.
input.labelobjectAn object that contains details about the label displayed for the input field. It provides a title or instructions for the user about what data to enter.
input.requiredbooleanA boolean value indicating whether the input field is mandatory. If true, the user must fill in the field before submitting the form.
label.itemTypestringSpecifies the type of the label item. Determines the format and display of the label text. Valid value is TitleItem.
label.titlestringThe textual content of the label for the input field. This is the actual text displayed to the user, guiding them on what data to enter.