A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week.

Example Usage

import { CustomMessageResponse } from "syllable-sdk/models/components";

let value: CustomMessageResponse = {
  name: "<value>",
  text: "<value>",
  rules: [
    {
      description: "settle pluck shallow meh instead",
      timeRangeStart: "09:00",
      timeRangeEnd: "17:00",
      date: "2025-01-01",
      daysOfWeek: [
        "mo",
        "tu",
        "we",
        "th",
        "fr",
      ],
      invert: false,
      text: "Sorry, we're closed today",
    },
  ],
  id: 179603,
  updatedAt: new Date("2023-01-28T01:08:57.377Z"),
  lastUpdatedBy: "user@email.com",
};

Fields

FieldTypeRequiredDescriptionExample
namestringTRUEThe name of the custom message
textstringTRUEThe text of the custom message
labelstringFALSEThe label of the custom message
rulescomponents.CustomMessageRule[]FALSERules for time-specific message variants
idnumberTRUEThe ID of the custom message
updatedAtDateTRUETimestamp of the most recent update to the custom message
agentCountnumberFALSEThe number of agents using the custom message
lastUpdatedBystringTRUEThe email address of the user who most recently updated the custom messageuser@email.com
typestringFALSEN/A