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 Name | Type | Description | Required |
|---|---|---|---|
| abstractMessage | object | The message details. | |
| abstractMessage.messageType | string | The message type for the interaction. Set this value to StaticContentMessage. For more information on messageType, see Message Types and Message Format Types. | |
| abstractMessage.staticContent | object | The details for the static content. For messages, set formatType to Text, and provide your message content for text. | |
| abstractMessage.id | string | A unique ID for the interaction. This value must match the entryPayload.id value in this payload. | |
| abstractMessage.inReplyToMessageId | string | Holds 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.references | array | An array or list that contains references to related records or entities to link conversation entries to specific data within Salesforce or other systems. | |
| references.recordId | string | Within 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.id | string | Within 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.Choices | object | Specifies how the choices will be presented to the end user. | |
| choices.formatType | string | Specifies 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.items | array | An 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.images | array | An 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.assetType | string | Specifies the type of the image asset. For example, for Carousel payload, the value is ImageAsset. | |
| images.description | string | A textual description of the image. | |
| images.id | string | A unique identifier for the image asset. This ID is used to reference and manage the image within the system. | |
| images.mimeType | string | The MIME type of the image file. For example, image/png or image/jpeg indicates the format of the image. | |
| images.assetUrl | string | The URL where the image asset can be accessed. This is the location of the image file. | |
| images.referenceId | string | The reference ID that links the image to another entity or item. This is used to associate the image with a specific choice option. | |
| choices.items | array | An 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.titleItem | object | An 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. | |
| titleItem | object | An 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.itemType | string | Indicates 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.secondarySubTitle | string | An 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.title | string | The main title text for the item or option. This is the primary heading or label for the item. | |
| titleItem.subTitle | string | A secondary title or subtitle displayed below the main title, adding more descriptive information about the item. | |
| titleItem.tertiarySubTitle | string | A 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.referenceId | string | An 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.imageSubTitle | string | A subtitle specifically associated with an image. If the titleItem includes an image, this subtitle provides a caption or description for that image. | |
| titleItem.imageId | string | The 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.interactionItems | object | An 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.itemType | string | Specifies 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.titleItem | object | An 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.optionIdentifier | string | A unique identifier for a specific option within the interactionItems array. This is used to identify the option the user selects. | |
| interactionItems.optionId | string | Holds an additional option identifier. It’s also to identify the option that the user selects. | |
| abstractMessage.form | object | Represents 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.formType | string | Specifies the type or format of the form. A valid value is Inputs which indicates that the form will collect data through input fields. | |
| form.formTitle | object | An 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.formatType | string | Specifies the type or format of the form. Valid value is MessageDefinition. | |
| form.parameters | object | The parameters relevant to the form. | |
| form.sections | array | An 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.images | array | An 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.messageDefinitionNameOrId | string | Represents the messaging component ID. For more information, see Create a Secure Form. | |
| form.targetLocale | string | The target language or locale for the form. | |
| formTitle.itemType | string | Specifies the type of the title item used for the form title. Valid value is TitleItem. | |
| formTitle.title | string | The actual textual title of the form, which will be displayed to the user as the form’s main heading. | |
| sections.sectionType | string | Specifies 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.input | object | An 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.submitForm | boolean | A 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.inputType | string | Specifies 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.id | string | A unique identifier for the input field or control. This ID is used to reference and manage the input data when submitting the form. | |
| input.label | object | An 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.required | boolean | A boolean value indicating whether the input field is mandatory. If true, the user must fill in the field before submitting the form. | |
| label.itemType | string | Specifies the type of the label item. Determines the format and display of the label text. Valid value is TitleItem. | |
| label.title | string | The 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. |