Home Schema Example JSON Schema

Application Settings

Type: object

ProviderApplication.application_settings are used by ratatoskr.applications.AbstractApplicationss. This field is not exposed to frontend. This is where we store secret credentials.

No Additional Properties

Action State

Type: object

Application settings relating to action states.

No Additional Properties

Execute Automatically

Type: boolean

Whether to execute the action state automatically and bypass the original delivery handling for the application. Defaults to the application class variable action_state_execute_automatically (which is set to true).

Chatterbox Application Settings

Type: object

Application settings for chatterbox applications. This is used to configure Chatterbox specific settings such as restricted organizations.

No Additional Properties

User Info

Type: object

This user info will be augmented with user id, device id, chatroom id, and sent to Chatterbox as part of the user_info object.

Additional Properties of any type are allowed.

Type: object

Profile Input

Type: object

This profile input will be used for Jarvis. This should usually be overwritten with the appropriate information. Currently, only hospital application is supported.

Additional Properties of any type are allowed.

Type: object

Jarvis Application Settings

Type: object

Application settings for jarvis applications. This is used to configure Jarvis specific settings such as query engine URI.

No Additional Properties

Query Engine Settings

Type: string

This is the URI to the jarvis query engine settings.

Must be at least 1 characters long

LLM settings

Type: object

Settings for the LLM model during query flow.

Context size

Default: null

Context size aka context length

Context Template

Type: string Default: "You are a friendly and warm question-answer hospital assistant, employed as an employee of the hospital.\n The only information you know is the context provided. You can use only that information as your hidden knowledge base.\n When you answer, the context provided will be known as \"my training.\"\n If the context provided provides links, show it to the user."

Template for the context

Guardrail Identifier

Type: string Default: "arn:aws:bedrock:us-west-2:394252546268:guardrail/f83z6kx1d6hl"

Name of AWS guardrail if applicable. Should start with arn:aws:bedrock:us-west-2:.

Guardrail Version

Type: string Default: "1"

AWS Guardrail version (string) if applicable

Max Tokens

Type: integer Default: 1000

Max tokens returned by LLM

Model

Type: string

Name of LLM as per HuggingFace

Must be at least 1 characters long

Reranker Similarity Cutoff

Type: number Default: 0

Similarity score cutoff for node postprocessing based on reranker score

Similarity Cutoff

Type: number Default: 0.38

Similarity score cutoff for node postprocessing based on embedding score

Similarity top K

Type: integer Default: 6

Number of nodes to return after retrieval

Supported language codes

Type: array of string

Restricts bot to only answer only these languages. Provide list of 2-letter language codes, and double-check that Amazon Comprehend / Translate supports them.

No Additional Items

Each item of this array must be:

System Prompt

Type: string Default: "Answer the QUERY below only using the DOCUMENTs below as context, and not your trained knowledge."

Prompt for the LLM

Temperature

Type: number Default: 0

Temperature

FormSG OTP

Type: object

The FormSG OTP application sets a cache value with OTP from FormSG emails.

No Additional Properties

Cache Key

Type: string

Set the OTP value in the following cache key. Use {email} to substitute with the FormSG admin email address which is inferred from the email To header. Defaults to formsg:{email}:otp.

Must be at least 1 characters long

Healthcheck

Type: object

The Healthcheck application manages ping and pong deliveries between different providers to make sure they are working.

For HealthcheckApplication which drives the healthcheck process by regularly sending out pings (i.e., aka the pinger), we will send out ping messages to all the provider_applications defined here.
Likewise, when the pinger receives a pong message from a matching device/message, we will update the heartbeat on BetterUptime.

For provider-applications being "healthchecked" (i.e., aka the ponger), we will respond with the defined pong message if any of the provider_applications matches the device and messages on the incoming delivery.

No Additional Properties

Provider Applications

Type: array of object

An array of provider-applications that we will be healthchecking.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Device

Type: string

The device UID when sending out a ping or receiving a pong for healthcheck. We note that the device UID duplicates the provider-application name but the name is intended for readability purposes.

Must be at least 1 characters long

Heartbeat Key

Type: string

If set, it will report heartbeat to our Better Uptime account when a pong message is received. This is only applicable to the pinger provider-application.

Must be at least 1 characters long

Ping Messages

Type: object

Messages to send out for healthcheck pings (i.e., the pinger) and for comparison when receiving a ping (i.e., the ponger). Defaults to Message(Text('Healthcheck ping!')).

No Message

Type: enum (of boolean)

No message will be sent.

Must be one of:

  • false

Text Message

Type: string

Simple text message to send.

Must be at least 1 characters long

Array of Text Messages

Type: array of string

A text message will be uniformly selected from this array.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Message

Type: object

Ratatoskr Message.schema that will be sent to the user.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "message"

Message


Message element metadata.

Type: object

Title

Type: object

Title primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "title"

Title

Type: string

Title content.

Must be at least 1 characters long

Subtitle

Type: object

Subtitle primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "subtitle"

Subtitle

Type: string

Subtitle content.

Must be at least 1 characters long

Text

Type: object

Text primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "text"

Text

Type: string

Text content.

Must be at least 1 characters long

Type: object

Image

Type: object

Image primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "image"

Image Metadata

Type: object

Image element metadata.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Audio

Type: object

Audio primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "audio"

Audio Metadata

Type: object

Audio element metadata.

Preview Image

Type: object

Preview image of audio. Defaults to a generic audio icon.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Video

Type: object

Video primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "video"

Video Metadata

Type: object

Video element metadata.

Preview Image

Type: object

Preview image of video. Defaults to first frame of video.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Preview Autostart

Type: boolean

Whether to auto play video in preview view. Defaults to false.

Attachment

Type: object

Attachment primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "attachment"

Attachment Metadata

Type: object

Attachment element metadata.

No Additional Properties

URL

Type: string

URL to the attachment file.

Must match regular expression: ^((https|s3|gs|file)\:\/\/|\$)

Filename

Type: string

Filename for attachment. This is useful when the filename cannot be inferred from the URL.

Must be at least 1 characters long

Content Type

Type: string

The MIME type of the attachment. This is guessed from the extension of the filename followed by the url. See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Preview Image

Type: object

Preview image of attachment. Defaults to first frame of attachment.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Einstein attachment metadata

Type: object

Einstein-specific metadata for this attachment

Document UID

Type: string

Einstein Document UID for attachment.

Must be at least 1 characters long

Type: object

Button

Type: object

Button action primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "button"

Button Metadata

Type: object

Button action element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a button.

Style

Type: enum (of string)

Button styling options. cta refers to call to action buttons that have a blue background, while link buttons have white background. Defaults to link.

Must be one of:

  • "cta"
  • "link"

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Quick Reply

Type: object

Quick reply primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_reply"

Quick Reply Metadata

Type: object

Quick reply element metadata.

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Location Request

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_request"

Location Request Metadata

Type: object

Location request element metadata.

No Additional Properties

Text

Type: string

Prompt for the user when requesting for location.

Must be at least 1 characters long

Location Response

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_response"

Container Types

Type: object

Container types wrap around other primitive types.

Quick Replies

Type: object

Quick replies container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_replies"

Quick Replies

Type: array

Array of quick replys.

Must contain a minimum of 1 items

Must contain a maximum of 16 items

No Additional Items

Each item of this array must be:

Sections

Type: object

Sections are container types for up to at most 3 elements. These are most likely to be used for rich messages that include media, paragraphs, and actions.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "sections"

Sections

Type: array

An array of section elements.

Must contain a minimum of 1 items

Must contain a maximum of 5 items

No Additional Items

Each item of this array must be:


Paragraphs

Type: object

Paragraphs container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

No Additional Properties

URL

Type: string

URL to favorite item. This could be an internal botmd:// link or an external link.

Must be at least 1 characters long

Expires On

Type: stringFormat: date-time

This is used with botmd://hospital/jarvisQuery links using uids. If frontend decides to cache the content of this favorite message, it should be refreshed against the backend after the expiry.

Actions

Type: object

Actions container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Carousel

Type: object

Carousel container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "carousel"

Application Payload

Type: object

Application payload message.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "application_payload"

Application Payload Metadata

Type: object

Application payload element metadata.

No Additional Properties

Application

Type: string

Application origin of the data payload

Must be at least 1 characters long

Payload

Type: object or string

Arbitrary payload to be used by application. Can be any JSON object.

Email

Type: object

This is a high level representation of MIME emails.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "email"

Email Metadata

Type: object

Email element metadata.

Subject

Type: string

A short string identifying the topic of the message (RFC 2822).

Must be at least 1 characters long

Text

Type: string

The main body of the email in plain text.

HTML

Type: string

The main body of the email in HTML.

Must be at least 1 characters long

Attachments

Type: array

Attachments to the email.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

WhatsApp Template

Type: object

A message type encapsulating the WhatsApp template syntax. It is currently used by MessageBird.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "whatsapp_template"

WhatsApp Template

Type: object

WhatsApp template element metadata.

No Additional Properties

Template Name

Type: string

WhatsApp template name to use for this message.

Must be at least 1 characters long

Namespace

Type: string

WhatsApp namespace associated with the WABA. Defaults to the provider settings namespace.

Must be at least 1 characters long

Fallback Text

Type: string

For non-WhatsApp capable providers, it will be sent as a text message containing this string.

Must be at least 1 characters long

Language code

Type: string

Language code of the template. Note that language policy of the template message will always be deterministic. Defaults to en.

Must be at least 1 characters long

Header Parameters

Type: array of object

Array of parameters in header component of the template message. Applies to media templates only.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Document

Type: object

Document attachment in media template.

Filename

Type: string

Filename of document attachment. If caption is not specified, filename will be used instead.

Must be at least 1 characters long

Button Parameters

Type: array of object

Array of parameters in button component of the template message. Note that dynamic CTA is a very new feature (as of 2021-09-24).

No Additional Items

Each item of this array must be:


No Additional Properties

URL

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Text (Legacy)

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Index

Type: enum (of integer)

Position index of the button. You can have up to 3 buttons using index values of 0 to 2. Defaults to 0.

Must be one of:

  • 0
  • 1
  • 2

Empty Message

Type: object

An empty message with no content whatsoever.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "empty"

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Message Provider Metadata

Type: object

Message.provider_metadata is used on Messages to provide additional context to the provider for delivery.

No Additional Properties

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Message Tag

Type: enum (of string)

Use MESSAGE_TAG when sending this message. This is useful when sending messages outside of the 24 hour window. Do make sure that the tag corresponds to the actual content of the message. See Message Tags documentation for more details on what content is allowed by each tag.

Must be one of:

  • "CONFIRMED_EVENT_UPDATE"
  • "POST_PURCHASE_UPDATE"
  • "ACCOUNT_UPDATE"
  • "CUSTOMER_FEEDBACK"

ReplyTo

Type: object

This is the schema for the ReplyTo metadata representing replyee message information

No Additional Properties

Replyee Delivery UID

Type: null or string

The UID of the replyee delivery object. Used when replyee edits/deletes their message.

Replied on datetime

Type: stringFormat: date-time

Replied On datetime to track when we "copied" the replyee message (may be used to check if original message was edited post-reply)

Replyee name

Type: string

Name of replyee to render on Frontend

Must be at least 1 characters long

Series of Messages

Type: array

Series of Ratatoskr Message.schemas will be sent to the user.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Random Choices

Type: object

Choose from one of the arrays of Ratatoskr Message.schemas randomly.

No Additional Properties

Choices

Type: array of object

Array of choices of messages to choose from.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Messages

Type: array

An array of messages that form this random message choice.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Weight

Type: number

The relative weight of this message used to perform weighted choice. Defaults to 1.

Value must be strictly greater than 0

Pong Messages

Type: object

Messages to send out for healthcheck pongs (i.e., the ponger) and for comparison when receiving a pong (i.e., the pinger). Defaults to Message(Text('Healthcheck pong!')).

No Message

Type: enum (of boolean)

No message will be sent.

Must be one of:

  • false

Text Message

Type: string

Simple text message to send.

Must be at least 1 characters long

Array of Text Messages

Type: array of string

A text message will be uniformly selected from this array.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Message

Type: object

Ratatoskr Message.schema that will be sent to the user.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "message"

Message


Message element metadata.

Type: object

Title

Type: object

Title primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "title"

Title

Type: string

Title content.

Must be at least 1 characters long

Subtitle

Type: object

Subtitle primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "subtitle"

Subtitle

Type: string

Subtitle content.

Must be at least 1 characters long

Text

Type: object

Text primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "text"

Text

Type: string

Text content.

Must be at least 1 characters long

Type: object

Image

Type: object

Image primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "image"

Image Metadata

Type: object

Image element metadata.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Audio

Type: object

Audio primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "audio"

Audio Metadata

Type: object

Audio element metadata.

Preview Image

Type: object

Preview image of audio. Defaults to a generic audio icon.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Video

Type: object

Video primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "video"

Video Metadata

Type: object

Video element metadata.

Preview Image

Type: object

Preview image of video. Defaults to first frame of video.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Preview Autostart

Type: boolean

Whether to auto play video in preview view. Defaults to false.

Attachment

Type: object

Attachment primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "attachment"

Attachment Metadata

Type: object

Attachment element metadata.

No Additional Properties

URL

Type: string

URL to the attachment file.

Must match regular expression: ^((https|s3|gs|file)\:\/\/|\$)

Filename

Type: string

Filename for attachment. This is useful when the filename cannot be inferred from the URL.

Must be at least 1 characters long

Content Type

Type: string

The MIME type of the attachment. This is guessed from the extension of the filename followed by the url. See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Preview Image

Type: object

Preview image of attachment. Defaults to first frame of attachment.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Einstein attachment metadata

Type: object

Einstein-specific metadata for this attachment

Document UID

Type: string

Einstein Document UID for attachment.

Must be at least 1 characters long

Type: object

Button

Type: object

Button action primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "button"

Button Metadata

Type: object

Button action element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a button.

Style

Type: enum (of string)

Button styling options. cta refers to call to action buttons that have a blue background, while link buttons have white background. Defaults to link.

Must be one of:

  • "cta"
  • "link"

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Quick Reply

Type: object

Quick reply primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_reply"

Quick Reply Metadata

Type: object

Quick reply element metadata.

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Location Request

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_request"

Location Request Metadata

Type: object

Location request element metadata.

No Additional Properties

Text

Type: string

Prompt for the user when requesting for location.

Must be at least 1 characters long

Location Response

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_response"

Container Types

Type: object

Container types wrap around other primitive types.

Quick Replies

Type: object

Quick replies container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_replies"

Quick Replies

Type: array

Array of quick replys.

Must contain a minimum of 1 items

Must contain a maximum of 16 items

No Additional Items

Each item of this array must be:

Sections

Type: object

Sections are container types for up to at most 3 elements. These are most likely to be used for rich messages that include media, paragraphs, and actions.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "sections"

Sections

Type: array

An array of section elements.

Must contain a minimum of 1 items

Must contain a maximum of 5 items

No Additional Items

Each item of this array must be:


Paragraphs

Type: object

Paragraphs container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

No Additional Properties

URL

Type: string

URL to favorite item. This could be an internal botmd:// link or an external link.

Must be at least 1 characters long

Expires On

Type: stringFormat: date-time

This is used with botmd://hospital/jarvisQuery links using uids. If frontend decides to cache the content of this favorite message, it should be refreshed against the backend after the expiry.

Actions

Type: object

Actions container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Carousel

Type: object

Carousel container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "carousel"

Application Payload

Type: object

Application payload message.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "application_payload"

Application Payload Metadata

Type: object

Application payload element metadata.

No Additional Properties

Application

Type: string

Application origin of the data payload

Must be at least 1 characters long

Payload

Type: object or string

Arbitrary payload to be used by application. Can be any JSON object.

Email

Type: object

This is a high level representation of MIME emails.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "email"

Email Metadata

Type: object

Email element metadata.

Subject

Type: string

A short string identifying the topic of the message (RFC 2822).

Must be at least 1 characters long

Text

Type: string

The main body of the email in plain text.

HTML

Type: string

The main body of the email in HTML.

Must be at least 1 characters long

Attachments

Type: array

Attachments to the email.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

WhatsApp Template

Type: object

A message type encapsulating the WhatsApp template syntax. It is currently used by MessageBird.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "whatsapp_template"

WhatsApp Template

Type: object

WhatsApp template element metadata.

No Additional Properties

Template Name

Type: string

WhatsApp template name to use for this message.

Must be at least 1 characters long

Namespace

Type: string

WhatsApp namespace associated with the WABA. Defaults to the provider settings namespace.

Must be at least 1 characters long

Fallback Text

Type: string

For non-WhatsApp capable providers, it will be sent as a text message containing this string.

Must be at least 1 characters long

Language code

Type: string

Language code of the template. Note that language policy of the template message will always be deterministic. Defaults to en.

Must be at least 1 characters long

Header Parameters

Type: array of object

Array of parameters in header component of the template message. Applies to media templates only.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Document

Type: object

Document attachment in media template.

Filename

Type: string

Filename of document attachment. If caption is not specified, filename will be used instead.

Must be at least 1 characters long

Button Parameters

Type: array of object

Array of parameters in button component of the template message. Note that dynamic CTA is a very new feature (as of 2021-09-24).

No Additional Items

Each item of this array must be:


No Additional Properties

URL

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Text (Legacy)

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Index

Type: enum (of integer)

Position index of the button. You can have up to 3 buttons using index values of 0 to 2. Defaults to 0.

Must be one of:

  • 0
  • 1
  • 2

Empty Message

Type: object

An empty message with no content whatsoever.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "empty"

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Message Provider Metadata

Type: object

Message.provider_metadata is used on Messages to provide additional context to the provider for delivery.

No Additional Properties

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Message Tag

Type: enum (of string)

Use MESSAGE_TAG when sending this message. This is useful when sending messages outside of the 24 hour window. Do make sure that the tag corresponds to the actual content of the message. See Message Tags documentation for more details on what content is allowed by each tag.

Must be one of:

  • "CONFIRMED_EVENT_UPDATE"
  • "POST_PURCHASE_UPDATE"
  • "ACCOUNT_UPDATE"
  • "CUSTOMER_FEEDBACK"

ReplyTo

Type: object

This is the schema for the ReplyTo metadata representing replyee message information

No Additional Properties

Replyee Delivery UID

Type: null or string

The UID of the replyee delivery object. Used when replyee edits/deletes their message.

Replied on datetime

Type: stringFormat: date-time

Replied On datetime to track when we "copied" the replyee message (may be used to check if original message was edited post-reply)

Replyee name

Type: string

Name of replyee to render on Frontend

Must be at least 1 characters long

Series of Messages

Type: array

Series of Ratatoskr Message.schemas will be sent to the user.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Random Choices

Type: object

Choose from one of the arrays of Ratatoskr Message.schemas randomly.

No Additional Properties

Choices

Type: array of object

Array of choices of messages to choose from.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Messages

Type: array

An array of messages that form this random message choice.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Weight

Type: number

The relative weight of this message used to perform weighted choice. Defaults to 1.

Value must be strictly greater than 0

Message Testing Application Settings

Type: object

Application settings for message testing. This is used by frontend for integration/E2E testing. Do not change unless you know what you are doing.

No Additional Properties

Test Query-Responses

Type: array of object

An array of query/responses pairs.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Test Query

Type: string

When application receives this query (case sensitive exact), the below messages will be sent.

Must be at least 1 characters long

Metadata

Type: object

Delivery metadata to associate with the delivery.

No Additional Properties

Create Delivery

Type: boolean

Whether to create delivery object during outgoing flows.

BotMDHospitalProvider

Type: object

Delivery metadata for BotMDHospitalProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status

Must be one of:

  • "delivered"
  • "failed"

Delivery UIDs

Type: array of string

Delivery UID of delivery to native app. There can be multiple delivery UIDs when the user has multiple devices.

No Additional Items

Each item of this array must be:

Delivery UID

Type: string

Must be at least 1 characters long

LineProvider

Type: object

Delivery metadata for LineProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status enumerated by LineDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"
  • "hold_until_follow"
  • "hold_until_follow_expired"

Webhook Event ID

Type: string

The webhook event ID associated with an incoming delivery.

Must be at least 1 characters long

Message IDs

Type: array of string

Message IDs associated with this delivery.

Must contain a minimum of 0 items

No Additional Items

Each item of this array must be:

Unsent

Type: boolean

Whether this delivery has been unsent. Defaults to false.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

MessagebirdProvider

Type: object

Delivery metadata for MessagebirdProvider; obtained from https://developers.messagebird.com/api/conversations/#messagestatus-object.

No Additional Properties

Messagebird Message ID

Type: string or null

Messagebird message_id is useful for tracking the delivery status of a message.

Delivery Status

Type: enum (of string)

Delivery status enumerated by MessagebirdDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "accepted"
  • "pending"
  • "sent"
  • "transmitted"
  • "rejected"
  • "failed"
  • "read"
  • "received"
  • "deleted"
  • "unknown"
  • "delivered"

Pricing

Type: object

Pricing information for the message.

Billable

Type: boolean

Whether the message is billable based on conversation window.

Pricing Model

Type: string

The pricing model used for the message.

Expiration timestamp

Type: stringFormat: date-time

When the conversation window expires

Error

Type: object

The error object within the message payload. Only set when exist.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Messenger Entry ID

Type: string

Payload entry ID, i.e., payload['id'].

Must be at least 1 characters long

Message IDs

Type: array of string

List of message IDs, i.e., payload['messaging'][*]['mid']. Usually there is only 1.

No Additional Items

Each item of this array must be:

Delivery Status

Type: enum (of string)

Delivery status enumerated by MessengerDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "delivered"
  • "read"
  • "received"

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

NoopProvider

Type: object

Delivery metadata for NoopProvider and NoopPhoneProvider.

No Additional Properties

Status

Type: enum (of string)

Delivery status.

Must be one of:

  • "posted"
  • "received"
  • "unknown"

NoopProvider

Type: object

Delivery metadata for NoopProvider and NoopPhoneProvider.

No Additional Properties

Status

Type: enum (of string)

Delivery status.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"

Message ID

Type: string

Message ID of inbound/outbound messages.

Must be at least 1 characters long

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

PromoTexterProvider

Type: object

Delivery metadata for PromoTexterProvider. See PromoTexter Messaging API for more information.

Transaction IDs

Type: array of string

PromoTexter specific transaction IDs for each API request.

No Additional Items

Each item of this array must be:

Transaction ID

Type: string

Must be at least 1 characters long

Status

Type: enum (of string)

Delivery status enumerated by PromoTexterDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "delivered"
  • "failed"
  • "seen"
  • "clicked"
  • "unknown"
  • "received"

Error Code

Type: string

Error code returned by the provider.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

Additional Properties of any type are allowed.

Type: object

PusherProvider

Type: object

Delivery metadata for PusherProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status enumerated by PusherDeliveryStatus.

Must be one of:

  • "sent"
  • "received"
  • "read"
  • "failed"

Truncated

Type: boolean

Message was not included in Pusher payload due to size restrictions.

QiscusMultichannelProvider

Type: object

Delivery metadata for QiscusMultichannelProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status enumerated by PromoTexterDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"
  • "deleted"
  • "delivered"
  • "failed"
  • "read"
  • "sent"
  • "warning"

Message ID

Type: array of string

Message ID for incoming and outgoing messages. For incoming messages, it is of the form {payload["message"]["unique_temp_id"]}:{payload["message"]["id"]}. Only messages sent via WhatsApp API have message IDs.

No Additional Items

Each item of this array must be:

Message ID

Type: string

Must be at least 1 characters long

Payload Type

Type: enum (of string)

Whether the payload is sent or recieved via the multichannel API or WhatsApp API.

Must be one of:

  • "multichannel"
  • "whatsapp"

Pricing

Type: object

Pricing information for the message.

Billable

Type: boolean

Whether the message is billable based on conversation window.

Pricing Model

Type: string

The pricing model used for the message.

Category

Type: string

The category of the message.

Handover

Type: boolean

True if this is a handover delivery and the handover was done successfully. If unsuccessful, it will be false. This value is null or unspecified for regular message deliveries.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

QiscusMultichannelProvider

Type: object

Delivery metadata for QiscusMultichannelProvider.

No Additional Properties

Message ID

Type: array of string

Message ID for incoming and outgoing messages. For incoming messages, it is of the form {payload["id"]}

No Additional Items

Each item of this array must be:

Agent Handover

Type: boolean

True if this is a handover delivery and the handover was done successfully. If unsuccessful, it will be false. This value is null or unspecified for regular message deliveries.

Delivery Status

Type: enum (of string)

Delivery status enumerated by QontakDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"
  • "delivered"
  • "read"
  • "failed"

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

SESProvider

Type: object

Delivery metadata for SESProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status enumerated by SESDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"
  • "bounced"

Incoming Receipt

Type: object

Receipt metadata. This is basically the SES notification payload.

No Additional Properties

Message ID

Type: string

The SES assigned message ID.

Must be at least 1 characters long

Payload

Type: object

The original payload from SES.

Mail

Type: object

This is provided by SES. See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-notifications-examples.html

Receipt

Type: object

This is provided by SES. See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-notifications-examples.html

Outgoing Metadata

Type: object

Outgoing metadata. This is basically the SES response to send_email.

No Additional Properties

Message ID

Type: string

The outgoing message ID given by AWS SES.

Must be at least 1 characters long

Status Code

Type: integer

The HTTPStatusCode returned by SES.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

SmoochProvider

Type: object

Delivery metadata for SmoochProvider.

No Additional Properties

Message ID

Type: string

Smooch message_id is useful for tracking the delivery status of a message.

Delivery Status

Type: enum (of string)

Delivery status enumerated by SmoochDeliveryStatus.

Must be one of:

  • "sent"
  • "delivery_success"
  • "delivery_failure"
  • "received"

Bot MD API key

Type: string

An API key used by Bot MD to determine the organization using the Smooch application. This is necessary because we multiplex multiple clients into one Smooch application.

Must be at least 1 characters long

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

SMTPProvider

Type: object

Delivery metadata for SMTPProvider.

No Additional Properties

Delivery Status

Type: enum (of string)

Delivery status enumerated by SMTPDeliveryStatus.

Must be one of:

  • "sent"
  • "failed"

Error

Type: object

Error message when failed to deliver email.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

TelegramProvider

Type: object

Delivery metadata for TelegramProvider.

No Additional Properties

Update ID

Type: number

The update_id in the webhook payload is globally unique. See Python Telegram Bot documentation.

Message IDs

Type: array of number

Telegram message.message_ids are incremental ID that are not globally unique.

No Additional Items

Each item of this array must be:

Delivery Status

Type: enum (of string)

Delivery status enumerated by TelegramDeliveryStatus.

Must be one of:

  • "received"
  • "posted"
  • "post_failed"

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

TwilioProvider

Type: object

Delivery metadata for TwilioProvider. Information about message statuses can be found here https://www.twilio.com/docs/messaging/guides/webhook-request#status-callback-parameters

No Additional Properties

Type: object

The following properties are required:

  • message_sid
  • status
  • sent_from
Type: object

The following properties are required:

  • message_sid
  • status
  • received_by

Twilio Message ID

Type: string or null

Twilio message_sid is useful for tracking the delivery status of a message.

Delivery Status

Type: enum (of string)

Delivery status enumerated by TwilioDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "delivered"
  • "failed"
  • "queued"
  • "read"
  • "sent"
  • "undelivered"
  • "received"

Received By

Type: string

This is the Twilio phone number that received the message. This is useful when multiple numbers are used for the same Twilio provider.

Must match regular expression: ^\+\d{5,}$

Sent From

Type: string

This is the Twilio phone that sent the message. This is useful when multiple numbers are used for the same Twilio provider.

Must match regular expression: ^\+\d{5,}$

Billing

Type: object

Metadata related to billing.

No Additional Properties

Num Segments

Type: integer

Number of segments used for billing purposes.

Value must be strictly greater than 0

Price

Type: string

Price of this message as charged by Twilio. String because it is treated as a Decimal.

Price Unit

Type: string

The currency of price.

Must be at least 1 characters long

Updated On

Type: stringFormat: date-time

Date/time the billing information was synced.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

ViberProvider

Type: object

Delivery metadata for ViberProvider.

No Additional Properties

Message Token

Type: string

The message token associated with an incoming delivery.

Must be at least 1 characters long

Delivery Status

Type: enum (of string)

Delivery status enumerated by ViberDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "received"
  • "delivered"
  • "hold_until_follow"
  • "hold_until_follow_expired"
  • "seen"
  • "failed"

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

WhatsAppProvider

Type: object

Delivery metadata for WhatsAppProvider.

No Additional Properties

Message IDs

Type: array of string

List of message IDs. Usually there is only 1.

No Additional Items

Each item of this array must be:

Delivery Status

Type: enum (of string)

Delivery status enumerated by WhatsAppDeliveryStatus.

Must be one of:

  • "posted"
  • "post_failed"
  • "delivered"
  • "read"
  • "sent"
  • "received"
  • "failed"

Pricing

Type: object

Pricing information for the message.

Billable

Type: boolean

Whether the message is billable.

Pricing Model

Type: string

The pricing model used for the message.

Category

Type: string

The category of the message.

Errors

Type: array

Errors received from provider's webhook

No Additional Items

Error

Type: object

Error message for post_failed.

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^\w+_on$

Status Update Date-Time

Type: stringFormat: date-time

This field is set when the status of the delivery is updated.

Action State

Type: object

Delivery metadata for ActionState.

No Additional Properties

Type: object

The following properties are required:

  • executed_by
Type: object

The following properties are required:

  • is_execution_successful

Executed By

Type: string

If this delivery is the result of an action state execution, it will be the UID of the delivery that "triggered" the execution.

Must be at least 1 characters long

Is Execution Successful

Type: boolean

True if this action state delivery executed successfully. Only action state deliveries will have this value set.

Is Via JWT

Type: boolean

Whether this action state's ApplicationPayload was created via JWT.

Ignore outgoing delivery

Type: boolean

Ignore outgoing delivey for action state message

Redirect To

Type: stringFormat: uri

When executing in via JWT, this value holds the URL to redirect the user to. This is used internally.

FCMProvider

Type: object

Delivery metadata for FCMProvider.

No Additional Properties

Mute delivery

Type: boolean

When this is set to true, the delivery doesn't get through the fcm provider.

Custom Data Message

Type: object

Use this to override the default data message.

Additional Properties of any type are allowed.

Type: object

Delivery Status

Type: enum (of string)

Status of FCM delivery message

Must be one of:

  • "sent"
  • "failed"
  • "not_sent"

Bifrost

Type: object

Delivery metadata for Bifrost application.

No Additional Properties

Type: object

The following properties are required:

  • organization
  • flow_uid
  • connection_uid
  • purpose
Type: object

The following properties are required:

  • organization
  • query_delivery_uid

Organization

Type: string

Key of Bifrost organization that created this delivery.

Must be at least 1 characters long

Flow UID

Type: string

UID of Bifrost flow that created this delivery.

Must be at least 1 characters long

Connection UID

Type: string

UID of Bifrost connection that created this delivery.

Must be at least 1 characters long

Purpose

Type: string

Purpose Bifrost flow-connection that created this delivery.

Must be at least 1 characters long

Query Delivery UID

Type: string

The UID of the query delivery object. Useful for tracking query and responses.

Must be at least 1 characters long

Chemocalc

Type: object

Delivery metadata for Chemocalc application.

No Additional Properties

Delivery By

Type: enum (of string)

Describes the type of the message (e.g., alert, reminder, etc).

Must be one of:

  • "user"
  • "system"
  • "bot"
  • "unknown"

Message Template UID

Type: string

UID of the message template used for outgoing delivery.

Must be at least 1 characters long

Session UID

Type: string

UID of patient/doctor who sent the delivery.

Must be at least 1 characters long

Cleo

Type: object

Delivery metadata for Cleo application.

No Additional Properties

Type: object

The following properties are required:

  • delivery_by
  • clinic
  • profile_uid
Type: object

The following properties are required:

  • delivery_by
  • clinics
  • profile_uids

Delivery By

Type: enum (of string)

Describes the type of the message (e.g., alert, reminder, etc).

Must be one of:

  • "alert"
  • "reminder"
  • "enrollment"
  • "discharge"
  • "new_submission_comment"
  • "update_metadata_entry"
  • "submission"
  • "bot"
  • "clinician"
  • "user"
  • "system"
  • "unknown"
  • "event"
  • "payment"
  • "greeting"
  • "disclaimer"
  • "scheduling_reminder"

Clinic (Outgoing)

Type: string or null

Clinic that this outgoing delivery is part of.

Clinics (Incoming)

Type: array of string

Clinics that this incoming delivery is part of.

Must contain a minimum of 0 items

No Additional Items

Each item of this array must be:

Profile UID (Outgoing)

Type: string or null

UID of patient/clinician delivered to. This is for all outgoing deliveries.

Profile UIDs (Incoming)

Type: array of string

UID of patient for whom the delivery was processed. This is for all incoming deliveries.

Must contain a minimum of 0 items

No Additional Items

Each item of this array must be:

Calendar UID (Outgoing)

Type: string

UID of associated patient-event's calendar. This is for outgoing deliveries related to events.

Must be at least 1 characters long

Patient Event UID (Outgoing)

Type: string

UID of associated patient-event. This is for outgoing deliveries related to events.

Must be at least 1 characters long

Patient Form UID (Outgoing)

Type: string

UID of associated patient-form. This is for outgoing deliveries related to patient-forms.

Must be at least 1 characters long

Patient Group UID (Outgoing)

Type: string

UID of associated patient group. This is for outgoing deliveries using patient groups without monitoring forms.

Must be at least 1 characters long

Patient Payment UID (Outgoing)

Type: string

UID of associated patient-payment. This is for outgoing deliveries related to patient-payments.

Must be at least 1 characters long

Patient Payment Transaction UID (Outgoing)

Type: string

UID of associated patient-payment transaction. This is for outgoing deliveries related to patient-payments.

Must be at least 1 characters long

Patient Program UID (Outgoing)

Type: string

UID of associated patient program. This is for outgoing deliveries using patient program.

Must be at least 1 characters long

Patient Program Form UID (Outgoing)

Type: string

UID of associated patient program form. This is for outgoing deliveries using patient program form.

Must be at least 1 characters long

Query Delivery UID (Outgoing)

Type: string

The UID of the query delivery object. Useful for tracking query and responses.

Must be at least 1 characters long

Message Template Primary Key

Type: integer

Primary key of the message template used for outgoing delivery.

Value must be greater or equal to 1

Reminder Event Primary Key

Type: integer

Primary key of associated reminder event. This is for reminder deliveries.

Value must be greater or equal to 1

Clinician UID (Outgoing)

Type: string

For messages sent by clinicians (i.e., triggered via dashboard), this field will contain the clinician's UID.

Must be at least 1 characters long

Clinical Parameter UID

Type: string

UID for clinical parameter that is being updated.

Must be at least 1 characters long

Engage

Type: object

Delivery metadata associated with the specialized Engage application.

No Additional Properties

Module

Type: string

The module corresponding to this delivery.

Must be at least 1 characters long

Stage

Type: string

The stage corresponding to this delivery.

Einstein

Type: object

Delivery metadata for Einstein related features.

No Additional Properties

Broadcast UID

Type: string

Broadcast UID which this delivery is sent from.

Must be at least 1 characters long

Faraday

Type: object

Delivery metadata for Faraday application.

No Additional Properties

Delivery By

Type: enum (of string)

Describes the type of the message (e.g., alert, reminder, etc).

Must be one of:

  • "alert"
  • "reminder"
  • "bot"
  • "user"
  • "system"
  • "unknown"

Clinic

Type: string or null

Clinic that this delivery is part of.

Message Template Primary Key

Type: integer

Primary key of the message template used for outgoing delivery.

Value must be greater or equal to 1

Order UID

Type: string

For messages sent to patients, this field will contain the order's UIDs.

Must be at least 1 characters long

OrderExam UIDs

Type: array of string

For messages sent to patients, this field will contain the orderexam's UIDs.

No Additional Items

Each item of this array must be:

Profile UID

Type: string or null

UID of staff/patient delivered to.

Query Delivery UID

Type: string

The UID of the query delivery object. Useful for tracking query and responses.

Must be at least 1 characters long

Healthcheck

Type: object

Delivery metadata for Healthcheck.

No Additional Properties

Ping Delivery UID

Type: string

Delivery UID for the incoming ping delivery. This is set for outgoing pong deliveries.

Must be at least 1 characters long

Heimdall

Type: object

Delivery metadata for Heimdall.

No Additional Properties

Provider Application UID

Type: string

The Heimdall OTP provider that created this delivery.

Must be at least 1 characters long

Hospital

Type: object

Delivery metadata for Hospital application.

No Additional Properties

Delivery By


Describes how the message was delivered.

Notification Types

Type: object

These types are unique throughout the Bot MD ecosystem. These keys are used in the user's Profile.settings.notifications.deactivated[] to identify the notifications that they have deactivated.

Bot

Type: const

Messages from Bot. This is the default is no delivery_by is specified.

Specific value: "bot"

Email Notification

Type: const

Email Notification to Admin / User (eg. User License limit, activation, expiry, etc.)

Specific value: "email_notification"

Broadcast

Type: const

Broadcast to hospital

Specific value: "broadcast"

Profile Reminder

Type: const

Profile related reminder (eg. profile creation, activation, expiry, etc).

Specific value: "profile_reminder"

Temperature Reminder

Type: const

Temperature reminder for Singapore hospitals.

Specific value: "temperature_reminder"

ART Reminder

Type: const

ART reminder for Singapore hospitals.

Specific value: "art_reminder"

ED

Type: const

ED Roster Updates used by TTSH Emergency Department.

Specific value: "ed_roster"

Mental Health

Type: const

Mental Health bot for TTSH.

Specific value: "emobot"

Mood Log Reminder

Type: const

Mood Log Reminder for TTSH Mental Health Module (2024)

Specific value: "moodlog_reminder"

ECG

Type: const

ECG Updates used by TTSH Emergency Department.

Specific value: "ecg"

Arise

Type: const

Arise/PSP used by Roche.

Specific value: "arise_psp"

Short Name

Type: string

Hospital short name for the profile recieving this delivery.

Query Delivery UID

Type: string

The UID of the query delivery object. Useful for tracking query and responses.

Must be at least 1 characters long

Response Time

Type: number

Time taken to get response from athena. Includes internal service network RTT.

Value must be greater or equal to 0

Jarvis

Type: object

Delivery metadata for Jarvis application.

No Additional Properties

Type: object

Name

Type: string

Name of the query engine as specified in the query engine settings.

Must be at least 1 characters long

Version

Type: string

Version of the query engine. This is based on the Kondo version (i.e., commit ID of the corresponding Kondo resource).

Version

Type: string

Version of Jarvis. This is usually equivalent to the deploy Hippocrates version.

Must be at least 1 characters long

Module Response

Type: object

Summary of the module that responded to this query.

Type

Type: string

Type/Name of the module that responded to this query.

Must be at least 1 characters long

Mastermind

Type: object

Delivery metadata for when a delivery is sent by a Mastermind user from the device page.

No Additional Properties

Delivery By

Type: string

The Mastermind user that sent this delivery.

Maxwell

Type: object

Delivery metadata for maxwell orders.

No Additional Properties

Order ID

Type: integer

Maxwell Order ID associated with this message delivery.

Ratatoskr

Type: object

Delivery metadata related to Ratatoskr.

No Additional Properties

Is Technical Error Message

Type: boolean

This delivery is in response to an unhandled exception.

Is Subscribe Message

Type: boolean

This delivery is in response to an subscribe request.

Is Unsubscribe Message

Type: boolean

This delivery is in response to an unsubscribe request.

Retry Deliveries

Type: object

Delivery metadata for when a delivery is retried using the retry_deliveries management command.

No Additional Properties

Delivery By

Type: enum (of string)

How retry delivery was invoked.

Must be one of:

  • "cli"
  • "mastermind"
  • "kronos"

Delivery UID

Type: string

The uid of the delivery that is being retried.

Must be at least 1 characters long

Retried By

Type: string

Either the AWS STS caller ID or Mastermind username of the user who triggered the retry.

Must be at least 1 characters long

Retry Attempts

Type: integer

Number of times the delivery has been retried.

Has Retried

Type: boolean

Whether the delivery has been retried to sent so it won't auto-retry again.

Variables

Type: object

Used for variable substitution inside message content. Any instance of ${name} in the message content will be replaced using simple string substitution.

Each additional property must conform to the following schema

Type: string

Query Metrics

Type: object

Contains information related to the Jarvis query flow for use in analysis.

Jarvis modules related to the query flow.

Type: array of string
No Additional Items

Each item of this array must be:

Jarvis Chernobyl miniapps related to the query flow.

Type: array of string
No Additional Items

Each item of this array must be:

Indicates if the message is a sorry message.

Type: boolean

Indicates if Jarvis is is confident of the reply.

Type: boolean

The querying hospital

Type: string

Must be at least 1 characters long

Query Nonce (one occasion) used for identifying multipart messages that belong to the same querying session.

Type: string

Must be at least 1 characters long

Legacy

Type: object

Delivery metadata for legacy ChatResponses.

Additional Properties of any type are allowed.

Type: object

Test Responses

Type: array

These messages are sent on receipt of the test queries.

No Additional Items

Each item of this array must be:

Message

Type: object

This is the schema for messages as described and proposed in the Ratatoskr: Data Models for Messages RFC.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "message"

Message


Message element metadata.

Type: object

Title

Type: object

Title primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "title"

Title

Type: string

Title content.

Must be at least 1 characters long

Subtitle

Type: object

Subtitle primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "subtitle"

Subtitle

Type: string

Subtitle content.

Must be at least 1 characters long

Text

Type: object

Text primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "text"

Text

Type: string

Text content.

Must be at least 1 characters long

Type: object

Image

Type: object

Image primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "image"

Image Metadata

Type: object

Image element metadata.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Audio

Type: object

Audio primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "audio"

Audio Metadata

Type: object

Audio element metadata.

Preview Image

Type: object

Preview image of audio. Defaults to a generic audio icon.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Video

Type: object

Video primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "video"

Video Metadata

Type: object

Video element metadata.

Preview Image

Type: object

Preview image of video. Defaults to first frame of video.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Preview Autostart

Type: boolean

Whether to auto play video in preview view. Defaults to false.

Attachment

Type: object

Attachment primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "attachment"

Attachment Metadata

Type: object

Attachment element metadata.

No Additional Properties

URL

Type: string

URL to the attachment file.

Must match regular expression: ^((https|s3|gs|file)\:\/\/|\$)

Filename

Type: string

Filename for attachment. This is useful when the filename cannot be inferred from the URL.

Must be at least 1 characters long

Content Type

Type: string

The MIME type of the attachment. This is guessed from the extension of the filename followed by the url. See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Preview Image

Type: object

Preview image of attachment. Defaults to first frame of attachment.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Einstein attachment metadata

Type: object

Einstein-specific metadata for this attachment

Document UID

Type: string

Einstein Document UID for attachment.

Must be at least 1 characters long

Type: object

Button

Type: object

Button action primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "button"

Button Metadata

Type: object

Button action element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a button.

Style

Type: enum (of string)

Button styling options. cta refers to call to action buttons that have a blue background, while link buttons have white background. Defaults to link.

Must be one of:

  • "cta"
  • "link"

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Quick Reply

Type: object

Quick reply primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_reply"

Quick Reply Metadata

Type: object

Quick reply element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a quick reply.

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Location Request

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_request"

Location Request Metadata

Type: object

Location request element metadata.

No Additional Properties

Text

Type: string

Prompt for the user when requesting for location.

Must be at least 1 characters long

Location Response

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_response"

Location Response Metadata

Type: object

Location response element metadata.

No Additional Properties

Address

Type: string

Human-readable address of the location.

Must be at least 1 characters long

Container Types

Type: object

Container types wrap around other primitive types.

Quick Replies

Type: object

Quick replies container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_replies"

Quick Replies

Type: array

Array of quick replys.

Must contain a minimum of 1 items

Must contain a maximum of 16 items

No Additional Items

Each item of this array must be:

Sections

Type: object

Sections are container types for up to at most 3 elements. These are most likely to be used for rich messages that include media, paragraphs, and actions.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "sections"

Sections

Type: array

An array of section elements.

Must contain a minimum of 1 items

Must contain a maximum of 5 items

No Additional Items

Each item of this array must be:


Paragraphs

Type: object

Paragraphs container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

No Additional Properties

URL

Type: string

URL to favorite item. This could be an internal botmd:// link or an external link.

Must be at least 1 characters long

Expires On

Type: stringFormat: date-time

This is used with botmd://hospital/jarvisQuery links using uids. If frontend decides to cache the content of this favorite message, it should be refreshed against the backend after the expiry.

Actions

Type: object

Actions container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Carousel

Type: object

Carousel container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "carousel"

Application Payload

Type: object

Application payload message.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "application_payload"

Application Payload Metadata

Type: object

Application payload element metadata.

No Additional Properties

Application

Type: string

Application origin of the data payload

Must be at least 1 characters long

Payload

Type: object or string

Arbitrary payload to be used by application. Can be any JSON object.

Email

Type: object

This is a high level representation of MIME emails.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "email"

Email Metadata

Type: object

Email element metadata.

Subject

Type: string

A short string identifying the topic of the message (RFC 2822).

Must be at least 1 characters long

Text

Type: string

The main body of the email in plain text.

HTML

Type: string

The main body of the email in HTML.

Must be at least 1 characters long

Attachments

Type: array

Attachments to the email.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

WhatsApp Template

Type: object

A message type encapsulating the WhatsApp template syntax. It is currently used by MessageBird.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "whatsapp_template"

WhatsApp Template

Type: object

WhatsApp template element metadata.

No Additional Properties

Template Name

Type: string

WhatsApp template name to use for this message.

Must be at least 1 characters long

Namespace

Type: string

WhatsApp namespace associated with the WABA. Defaults to the provider settings namespace.

Must be at least 1 characters long

Fallback Text

Type: string

For non-WhatsApp capable providers, it will be sent as a text message containing this string.

Must be at least 1 characters long

Language code

Type: string

Language code of the template. Note that language policy of the template message will always be deterministic. Defaults to en.

Must be at least 1 characters long

Header Parameters

Type: array of object

Array of parameters in header component of the template message. Applies to media templates only.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Document

Type: object

Document attachment in media template.

Caption

Type: string

Caption to accompany the document attachment.

Must be at least 1 characters long

Filename

Type: string

Filename of document attachment. If caption is not specified, filename will be used instead.

Must be at least 1 characters long

Button Parameters

Type: array of object

Array of parameters in button component of the template message. Note that dynamic CTA is a very new feature (as of 2021-09-24).

No Additional Items

Each item of this array must be:


No Additional Properties

URL

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Text (Legacy)

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Index

Type: enum (of integer)

Position index of the button. You can have up to 3 buttons using index values of 0 to 2. Defaults to 0.

Must be one of:

  • 0
  • 1
  • 2

Empty Message

Type: object

An empty message with no content whatsoever.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "empty"

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Message Provider Metadata

Type: object

Message.provider_metadata is used on Messages to provide additional context to the provider for delivery.

No Additional Properties

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Message Tag

Type: enum (of string)

Use MESSAGE_TAG when sending this message. This is useful when sending messages outside of the 24 hour window. Do make sure that the tag corresponds to the actual content of the message. See Message Tags documentation for more details on what content is allowed by each tag.

Must be one of:

  • "CONFIRMED_EVENT_UPDATE"
  • "POST_PURCHASE_UPDATE"
  • "ACCOUNT_UPDATE"
  • "CUSTOMER_FEEDBACK"

ReplyTo

Type: object

This is the schema for the ReplyTo metadata representing replyee message information

No Additional Properties

Replyee Delivery UID

Type: null or string

The UID of the replyee delivery object. Used when replyee edits/deletes their message.

Replied on datetime

Type: stringFormat: date-time

Replied On datetime to track when we "copied" the replyee message (may be used to check if original message was edited post-reply)

Replyee name

Type: string

Name of replyee to render on Frontend

Must be at least 1 characters long

Noop

Type: object

The NoopApplication does nothing on all incoming messages and does not deliver any outgoing messages. If outgoing deliveries are desired, use NoopIncomingApplication instead.

OTP Forwarding

Type: object

The OTP forwarding application simply forwards incoming messages to another provider application.

No Additional Properties

Forward To

Type: array of object

An array of objects describing which provider application and destinations to forward to.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Provider Application

Type: string

Provider application to forward the requests to. This can either be a name or uid.

Must be at least 1 characters long

Destinations

Type: array of string

Destination to forward to. This is usually email or E.164 phone numbers.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: string

Must be at least 1 characters long

Device Type

Type: enum (of string)

The keyword argument for upsert_device. Only email and phone based providers are currently supported. Defaults to phone.

Must be one of:

  • "phone"
  • "email"

Ratatoskr

Type: object

Ratatoskr related settings.

No Additional Properties

Process Subscribe Delivery

Type: boolean

Check the messages for subscribe requests and processes it in Ratatoskr. Defaults to true.

Process Unsubscribe Delivery

Type: boolean

Check the messages for unsubscribe requests and processes it in Ratatoskr. Defaults to true.

Subscribe Message Strings

Type: array of string

Trigger phrases for subscribe process.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: string

Must be at least 1 characters long

Subscribe Messages

Type: object

Messages to send out in response to an subscribe request. See code for default value.

No Message

Type: enum (of boolean)

No message will be sent.

Must be one of:

  • false

Text Message

Type: string

Simple text message to send.

Must be at least 1 characters long

Array of Text Messages

Type: array of string

A text message will be uniformly selected from this array.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Message

Type: object

Ratatoskr Message.schema that will be sent to the user.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "message"

Message


Message element metadata.

Type: object

Title

Type: object

Title primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "title"

Title

Type: string

Title content.

Must be at least 1 characters long

Subtitle

Type: object

Subtitle primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "subtitle"

Subtitle

Type: string

Subtitle content.

Must be at least 1 characters long

Text

Type: object

Text primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "text"

Text

Type: string

Text content.

Must be at least 1 characters long

Type: object

Image

Type: object

Image primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "image"

Image Metadata

Type: object

Image element metadata.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Audio

Type: object

Audio primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "audio"

Audio Metadata

Type: object

Audio element metadata.

Preview Image

Type: object

Preview image of audio. Defaults to a generic audio icon.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Video

Type: object

Video primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "video"

Video Metadata

Type: object

Video element metadata.

Preview Image

Type: object

Preview image of video. Defaults to first frame of video.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Preview Autostart

Type: boolean

Whether to auto play video in preview view. Defaults to false.

Attachment

Type: object

Attachment primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "attachment"

Attachment Metadata

Type: object

Attachment element metadata.

No Additional Properties

URL

Type: string

URL to the attachment file.

Must match regular expression: ^((https|s3|gs|file)\:\/\/|\$)

Filename

Type: string

Filename for attachment. This is useful when the filename cannot be inferred from the URL.

Must be at least 1 characters long

Content Type

Type: string

The MIME type of the attachment. This is guessed from the extension of the filename followed by the url. See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Preview Image

Type: object

Preview image of attachment. Defaults to first frame of attachment.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Einstein attachment metadata

Type: object

Einstein-specific metadata for this attachment

Document UID

Type: string

Einstein Document UID for attachment.

Must be at least 1 characters long

Type: object

Button

Type: object

Button action primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "button"

Button Metadata

Type: object

Button action element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a button.

Style

Type: enum (of string)

Button styling options. cta refers to call to action buttons that have a blue background, while link buttons have white background. Defaults to link.

Must be one of:

  • "cta"
  • "link"

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Quick Reply

Type: object

Quick reply primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_reply"

Quick Reply Metadata

Type: object

Quick reply element metadata.

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Location Request

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_request"

Location Request Metadata

Type: object

Location request element metadata.

No Additional Properties

Text

Type: string

Prompt for the user when requesting for location.

Must be at least 1 characters long

Location Response

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_response"

Container Types

Type: object

Container types wrap around other primitive types.

Quick Replies

Type: object

Quick replies container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_replies"

Quick Replies

Type: array

Array of quick replys.

Must contain a minimum of 1 items

Must contain a maximum of 16 items

No Additional Items

Each item of this array must be:

Sections

Type: object

Sections are container types for up to at most 3 elements. These are most likely to be used for rich messages that include media, paragraphs, and actions.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "sections"

Sections

Type: array

An array of section elements.

Must contain a minimum of 1 items

Must contain a maximum of 5 items

No Additional Items

Each item of this array must be:


Paragraphs

Type: object

Paragraphs container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

No Additional Properties

URL

Type: string

URL to favorite item. This could be an internal botmd:// link or an external link.

Must be at least 1 characters long

Expires On

Type: stringFormat: date-time

This is used with botmd://hospital/jarvisQuery links using uids. If frontend decides to cache the content of this favorite message, it should be refreshed against the backend after the expiry.

Actions

Type: object

Actions container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Carousel

Type: object

Carousel container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "carousel"

Application Payload

Type: object

Application payload message.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "application_payload"

Application Payload Metadata

Type: object

Application payload element metadata.

No Additional Properties

Application

Type: string

Application origin of the data payload

Must be at least 1 characters long

Payload

Type: object or string

Arbitrary payload to be used by application. Can be any JSON object.

Email

Type: object

This is a high level representation of MIME emails.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "email"

Email Metadata

Type: object

Email element metadata.

Subject

Type: string

A short string identifying the topic of the message (RFC 2822).

Must be at least 1 characters long

Text

Type: string

The main body of the email in plain text.

HTML

Type: string

The main body of the email in HTML.

Must be at least 1 characters long

Attachments

Type: array

Attachments to the email.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

WhatsApp Template

Type: object

A message type encapsulating the WhatsApp template syntax. It is currently used by MessageBird.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "whatsapp_template"

WhatsApp Template

Type: object

WhatsApp template element metadata.

No Additional Properties

Template Name

Type: string

WhatsApp template name to use for this message.

Must be at least 1 characters long

Namespace

Type: string

WhatsApp namespace associated with the WABA. Defaults to the provider settings namespace.

Must be at least 1 characters long

Fallback Text

Type: string

For non-WhatsApp capable providers, it will be sent as a text message containing this string.

Must be at least 1 characters long

Language code

Type: string

Language code of the template. Note that language policy of the template message will always be deterministic. Defaults to en.

Must be at least 1 characters long

Header Parameters

Type: array of object

Array of parameters in header component of the template message. Applies to media templates only.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Document

Type: object

Document attachment in media template.

Filename

Type: string

Filename of document attachment. If caption is not specified, filename will be used instead.

Must be at least 1 characters long

Button Parameters

Type: array of object

Array of parameters in button component of the template message. Note that dynamic CTA is a very new feature (as of 2021-09-24).

No Additional Items

Each item of this array must be:


No Additional Properties

URL

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Text (Legacy)

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Index

Type: enum (of integer)

Position index of the button. You can have up to 3 buttons using index values of 0 to 2. Defaults to 0.

Must be one of:

  • 0
  • 1
  • 2

Empty Message

Type: object

An empty message with no content whatsoever.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "empty"

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Message Provider Metadata

Type: object

Message.provider_metadata is used on Messages to provide additional context to the provider for delivery.

No Additional Properties

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Message Tag

Type: enum (of string)

Use MESSAGE_TAG when sending this message. This is useful when sending messages outside of the 24 hour window. Do make sure that the tag corresponds to the actual content of the message. See Message Tags documentation for more details on what content is allowed by each tag.

Must be one of:

  • "CONFIRMED_EVENT_UPDATE"
  • "POST_PURCHASE_UPDATE"
  • "ACCOUNT_UPDATE"
  • "CUSTOMER_FEEDBACK"

ReplyTo

Type: object

This is the schema for the ReplyTo metadata representing replyee message information

No Additional Properties

Replyee Delivery UID

Type: null or string

The UID of the replyee delivery object. Used when replyee edits/deletes their message.

Replied on datetime

Type: stringFormat: date-time

Replied On datetime to track when we "copied" the replyee message (may be used to check if original message was edited post-reply)

Replyee name

Type: string

Name of replyee to render on Frontend

Must be at least 1 characters long

Series of Messages

Type: array

Series of Ratatoskr Message.schemas will be sent to the user.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Random Choices

Type: object

Choose from one of the arrays of Ratatoskr Message.schemas randomly.

No Additional Properties

Choices

Type: array of object

Array of choices of messages to choose from.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Messages

Type: array

An array of messages that form this random message choice.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Weight

Type: number

The relative weight of this message used to perform weighted choice. Defaults to 1.

Value must be strictly greater than 0

Unsubscribe Message Strings

Type: array of string

Trigger phrases for unsubscribe process.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: string

Must be at least 1 characters long

Unsubscribe Messages

Type: object

Messages to send out in response to an unsubscribe request. See code for default value.

No Message

Type: enum (of boolean)

No message will be sent.

Must be one of:

  • false

Text Message

Type: string

Simple text message to send.

Must be at least 1 characters long

Array of Text Messages

Type: array of string

A text message will be uniformly selected from this array.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Message

Type: object

Ratatoskr Message.schema that will be sent to the user.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "message"

Message


Message element metadata.

Type: object

Title

Type: object

Title primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "title"

Title

Type: string

Title content.

Must be at least 1 characters long

Subtitle

Type: object

Subtitle primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "subtitle"

Subtitle

Type: string

Subtitle content.

Must be at least 1 characters long

Text

Type: object

Text primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "text"

Text

Type: string

Text content.

Must be at least 1 characters long

Type: object

Image

Type: object

Image primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "image"

Image Metadata

Type: object

Image element metadata.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Audio

Type: object

Audio primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "audio"

Audio Metadata

Type: object

Audio element metadata.

Preview Image

Type: object

Preview image of audio. Defaults to a generic audio icon.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Video

Type: object

Video primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "video"

Video Metadata

Type: object

Video element metadata.

Preview Image

Type: object

Preview image of video. Defaults to first frame of video.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Preview Autostart

Type: boolean

Whether to auto play video in preview view. Defaults to false.

Attachment

Type: object

Attachment primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "attachment"

Attachment Metadata

Type: object

Attachment element metadata.

No Additional Properties

URL

Type: string

URL to the attachment file.

Must match regular expression: ^((https|s3|gs|file)\:\/\/|\$)

Filename

Type: string

Filename for attachment. This is useful when the filename cannot be inferred from the URL.

Must be at least 1 characters long

Content Type

Type: string

The MIME type of the attachment. This is guessed from the extension of the filename followed by the url. See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Preview Image

Type: object

Preview image of attachment. Defaults to first frame of attachment.

Scale

Type: enum (of string)

Overrides frontend's default image scaling algorithm.

Must be one of:

  • "center"
  • "center-crop"
  • "center-inside"

Actionable

Type: object

Action to take when clicking on the image (or preview image). Defaults to opening the image in viewer.

URL

Type: string

URL to the link file. Could be application internal links too. Currently supported internal links are: botmd://hospital/postMessage, botmd://hospital/emobot, botmd://hospital/gql, and `botmd://hospital/jarvisQuery.

Must be at least 1 characters long

External Browser

Type: boolean

Whether to open the url in an external browser instead of our own webview. Defaults to false.

Content Type

Type: string

The MIME type of the content at URL. This is guessed from the extension of the url. If it is a http/https URL and there are no file extensions, text/html is assumed.
This is useful to override the default app responsible for opening it.
See scalpel.messages.url.ContentTypeMixin for content type guessing logic.

Must be at least 1 characters long

Event Metadata

Type: object

Metadata to describe an event that can be posted to Shadowfax. This is usually part of an Actionable.

No Additional Properties

Type

Type: string

Event type that will be posted to Shadowfax (i.e., event_type) when this action is taken.

Must be at least 1 characters long

Properties

Type: object

Optional event properties that will be posted to Shadowfax (i.e., event_properties) when this action is taken.

Einstein attachment metadata

Type: object

Einstein-specific metadata for this attachment

Document UID

Type: string

Einstein Document UID for attachment.

Must be at least 1 characters long

Type: object

Button

Type: object

Button action primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "button"

Button Metadata

Type: object

Button action element metadata.

Visuals

Type: object

Metadata to describe the visual aspect of a button.

Style

Type: enum (of string)

Button styling options. cta refers to call to action buttons that have a blue background, while link buttons have white background. Defaults to link.

Must be one of:

  • "cta"
  • "link"

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Quick Reply

Type: object

Quick reply primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_reply"

Quick Reply Metadata

Type: object

Quick reply element metadata.

Actionable metadata

Type: object

Metadata to describe actions that are taken when a UI element is triggered (e.g., tapped, clicked, etc).

Same definition as actionable
Type: object

Location Request

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_request"

Location Request Metadata

Type: object

Location request element metadata.

No Additional Properties

Text

Type: string

Prompt for the user when requesting for location.

Must be at least 1 characters long

Location Response

Type: object

Location request primitive element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "location_response"

Container Types

Type: object

Container types wrap around other primitive types.

Quick Replies

Type: object

Quick replies container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "quick_replies"

Quick Replies

Type: array

Array of quick replys.

Must contain a minimum of 1 items

Must contain a maximum of 16 items

No Additional Items

Each item of this array must be:

Sections

Type: object

Sections are container types for up to at most 3 elements. These are most likely to be used for rich messages that include media, paragraphs, and actions.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "sections"

Sections

Type: array

An array of section elements.

Must contain a minimum of 1 items

Must contain a maximum of 5 items

No Additional Items

Each item of this array must be:


Paragraphs

Type: object

Paragraphs container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

No Additional Properties

URL

Type: string

URL to favorite item. This could be an internal botmd:// link or an external link.

Must be at least 1 characters long

Expires On

Type: stringFormat: date-time

This is used with botmd://hospital/jarvisQuery links using uids. If frontend decides to cache the content of this favorite message, it should be refreshed against the backend after the expiry.

Actions

Type: object

Actions container element.

No Additional Properties

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Carousel

Type: object

Carousel container element.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "carousel"

Application Payload

Type: object

Application payload message.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "application_payload"

Application Payload Metadata

Type: object

Application payload element metadata.

No Additional Properties

Application

Type: string

Application origin of the data payload

Must be at least 1 characters long

Payload

Type: object or string

Arbitrary payload to be used by application. Can be any JSON object.

Email

Type: object

This is a high level representation of MIME emails.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "email"

Email Metadata

Type: object

Email element metadata.

Subject

Type: string

A short string identifying the topic of the message (RFC 2822).

Must be at least 1 characters long

Text

Type: string

The main body of the email in plain text.

HTML

Type: string

The main body of the email in HTML.

Must be at least 1 characters long

Attachments

Type: array

Attachments to the email.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

WhatsApp Template

Type: object

A message type encapsulating the WhatsApp template syntax. It is currently used by MessageBird.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "whatsapp_template"

WhatsApp Template

Type: object

WhatsApp template element metadata.

No Additional Properties

Template Name

Type: string

WhatsApp template name to use for this message.

Must be at least 1 characters long

Namespace

Type: string

WhatsApp namespace associated with the WABA. Defaults to the provider settings namespace.

Must be at least 1 characters long

Fallback Text

Type: string

For non-WhatsApp capable providers, it will be sent as a text message containing this string.

Must be at least 1 characters long

Language code

Type: string

Language code of the template. Note that language policy of the template message will always be deterministic. Defaults to en.

Must be at least 1 characters long

Header Parameters

Type: array of object

Array of parameters in header component of the template message. Applies to media templates only.

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Document

Type: object

Document attachment in media template.

Filename

Type: string

Filename of document attachment. If caption is not specified, filename will be used instead.

Must be at least 1 characters long

Button Parameters

Type: array of object

Array of parameters in button component of the template message. Note that dynamic CTA is a very new feature (as of 2021-09-24).

No Additional Items

Each item of this array must be:


No Additional Properties

URL

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Text (Legacy)

Type: string

Either the full URI or path to use for CTA button. Note that only the path, query, and fragment will be used.

Must be at least 1 characters long

Index

Type: enum (of integer)

Position index of the button. You can have up to 3 buttons using index values of 0 to 2. Defaults to 0.

Must be one of:

  • 0
  • 1
  • 2

Empty Message

Type: object

An empty message with no content whatsoever.

No Additional Properties

Type

Type: const

The type of this element.

Specific value: "empty"

Favorite metadata

Type: object

When specified, the message / carousel item can be favorited on the frontend.

Same definition as favorite

Message Provider Metadata

Type: object

Message.provider_metadata is used on Messages to provide additional context to the provider for delivery.

No Additional Properties

MessengerProvider

Type: object

Delivery metadata for MessengerProvider.

No Additional Properties

Message Tag

Type: enum (of string)

Use MESSAGE_TAG when sending this message. This is useful when sending messages outside of the 24 hour window. Do make sure that the tag corresponds to the actual content of the message. See Message Tags documentation for more details on what content is allowed by each tag.

Must be one of:

  • "CONFIRMED_EVENT_UPDATE"
  • "POST_PURCHASE_UPDATE"
  • "ACCOUNT_UPDATE"
  • "CUSTOMER_FEEDBACK"

ReplyTo

Type: object

This is the schema for the ReplyTo metadata representing replyee message information

No Additional Properties

Replyee Delivery UID

Type: null or string

The UID of the replyee delivery object. Used when replyee edits/deletes their message.

Replied on datetime

Type: stringFormat: date-time

Replied On datetime to track when we "copied" the replyee message (may be used to check if original message was edited post-reply)

Replyee name

Type: string

Name of replyee to render on Frontend

Must be at least 1 characters long

Series of Messages

Type: array

Series of Ratatoskr Message.schemas will be sent to the user.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Random Choices

Type: object

Choose from one of the arrays of Ratatoskr Message.schemas randomly.

No Additional Properties

Choices

Type: array of object

Array of choices of messages to choose from.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object
No Additional Properties

Messages

Type: array

An array of messages that form this random message choice.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Weight

Type: number

The relative weight of this message used to perform weighted choice. Defaults to 1.

Value must be strictly greater than 0

Unsolicited Delivery Timeout

Type: integer

Seconds since the last incoming delivery before we consider an outgoing delivery "unsolicited". Defaults to 3600.

Value must be greater or equal to 1

Rooster

Type: object

Rooster related settings. Covers email webhook-driven integration with Rooster.

No Additional Properties

Data Source UID

Type: string

UID of Data Source that will be synced based on the incoming email information.

Must be at least 1 characters long