# Message attributes

Each SNS message contains a collection of key-value pairs called **message attributes**. The attributes of a particular message depend on the action that is performed on the entity.  Message attributes are used to filter messages to an SNS topic's subscribers, to ensure a subscriber only receives the events in which they are interested. Below are the message attributes included for the following types of messages:

* [Entity - Create, Update, Delete](/sns/message-attributes.md#entity-create-update-delete)
* [Entity - Action Executed](/sns/message-attributes.md#entity-action-executed)
* [Entity - Availability Changed](/sns/message-attributes.md#entity-availability-changed)
* [Relationship - Create, Update, Delete](/sns/message-attributes.md#relationship-create-update-delete)

## Entity - Create, Update, Delete

| Attribute Name | Data Type | Description                                            |
| -------------- | --------- | ------------------------------------------------------ |
| action         | string    | *created, updated, deleted*                            |
| charTypeID     | number    | The char type ID of the entity.                        |
| templateID     | number    | The template ID of the entity.                         |
| statusID       | number    | The status ID of the entity.                           |
| userID         | number    | The ID of the user that took the action on the entity. |

## Entity - Action Executed

| Attribute Name   | Data Type | Description                                            |
| ---------------- | --------- | ------------------------------------------------------ |
| action           | string    | *action-executed*                                      |
| charTypeID       | number    | The char type ID of the entity.                        |
| templateID       | number    | The template ID of the entity.                         |
| statusID         | number    | The status ID of the entity.                           |
| userID           | number    | The ID of the user that took the action on the entity. |
| executedActionID | number    | The ID of the action executed.                         |
| processID        | number    | The ID of the workflow process for the entity.         |

## Entity - Availability Changed

| Attribute Name | Data Type | Description                                            |
| -------------- | --------- | ------------------------------------------------------ |
| action         | string    | *availability-changed*                                 |
| charTypeID     | number    | The char type ID of the entity.                        |
| templateID     | number    | The template ID of the entity.                         |
| statusID       | number    | The status ID of the entity.                           |
| userID         | number    | The ID of the user that took the action on the entity. |

## Relationship - Create, Update, Delete

| Attribute Name     |        | Description                                                  |
| ------------------ | ------ | ------------------------------------------------------------ |
| action             | string | *created, updated, deleted*                                  |
| charTypeID         | number | *0*                                                          |
| relationshipTypeID | number | The type ID of the relationship.                             |
| parentCharTypeID   | number | The char type ID of the parent entity.                       |
| childCharTypeID    | number | The char type ID of the child entity.                        |
| parentTemplateID   | number | The template ID of the parent entity.                        |
| childTemplateID    | number | The template ID of the child entity.                         |
| parentStatusID     | number | The status ID of the parent entity.                          |
| childStatusID      | number | The status ID of the child entity.                           |
| userID             | number | The ID of the user that took the action on the relationship. |


---

# Agent Instructions: 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://queue-docs.rightsline.com/sns/message-attributes.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.
