> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemmodeler/services-and-integration/comet-real-time-messages.md).

# Comet - Real Time Messages

The Realtime messages functionality is used to allow an application to send messages. That means there is always a sender and a receiver/listener. These are created using [Realtime Messages](/platform/wemmodeler/flowcharts/comet-messages.md) flowchart nodes. A sender sends a messages through a particular message chanel, and the listener listens on a chanel for messages to arrive. And when a message arrives a specific action will be taken.\
&#x20;Example: a helpdesk system uses realtime messages to send a message to an escalation chanel when a high priority problem occurs. The listener then takes appropriate action (e.g. send a text message to an escalation officer) when a message arrives.

Almost all the functionality is available through the realtime messaging nodes. However, before you can use the functionality you need to define what a message looks like.

### Defining messages

To define a message, go to the `webservice and comet tab` in the WEM Modeler resource pane.&#x20;

<figure><img src="/files/pXvuzHr8BMjzMn2Ia3Vb" alt=""><figcaption></figcaption></figure>

\
Open the context menu of the folder Comet messages and select `New message` to create a new message definition. You have to give the message a `Name` and optionally a `Technical name`.\
Next you add the list(s) and/or fields that should be part of your message. In other words: you can create a model of all the data that you want to be part of your message. You can not create a database list because none of the data is stored in the database: it is only used when a message is sent directly over a connection to all listeners.

When you have defined the data model of the message, you can start sending and receiving messages using the [Comet Message node](/platform/wemmodeler/flowcharts/comet-messages.md). As part of the flow executing the message process you can assign values to the fields created in the message definition before you trigger the send message comet node, and all active listeners will receive these values - and you can present them or work with them in the On Message Received action (for example, using a Flowchart to show the message in an overlay).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wem.io/platform/wemmodeler/services-and-integration/comet-real-time-messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
