Skip to main content
Sends a message to the agent. Supports both visible messages and silent messages that are hidden from the chat UI.

Syntax

Parameters

string | object
required
The message to send. The value can be a simple string or a MessageRequest object.
object
Optional settings. Use { silent: true } to hide the message from the UI.

Returns

Resolves when the message is sent.

Examples

The following example sends a simple text message:

Considerations

silent option

Silent messages are sent to the agent but remain hidden from the chat UI. Use the silent option when you need to trigger agent responses without cluttering the conversation. When you send a silent message, the following sequence occurs:
  1. Message is sent to the agent for processing.
  2. Message is hidden from the chat UI.
  3. Agent can respond (response is visible to user).
  4. User only sees the agent’s response, not the trigger.
The following example triggers a welcome message:
The following example sends a feedback notification:
The following example tracks a user action:
Advanced implementation with MessageRequest with additional_properties For more control, use a MessageRequest object to specify message properties including visibility, thread targeting, and custom context.

MessageRequest structure

The following example sends a silent message with MessageRequest:
The following example sends a message with Thread and Context:

Override behavior

When you use both a MessageRequest object and the { silent: true } option, the { silent: true } option takes precedence:
Priority rules for override behavior:
  1. { silent: true } option It always hides the message.
  2. skip_render: true in message
    It hides the message.
  3. skip_render: false in message It shows the message.
  4. No option or property It shows the message. This is the default.
When to use each approach:
  • Use { silent: true } for simple cases and quick overrides.
  • Use additional_properties.display_properties.skip_render when building MessageRequest objects.
  • Combine both when you need to override message object settings at runtime.

Do you need practical examples?

Learn how to apply the features available for embedded chat into your implementation with guidance and examples.