---
# System prepended metadata

title: Module events description

---

#  Module events description

## Structure
| field  | required | description   |
| -----  | -------- | ------------- |
| name   | true     | Name of event |
| update | false    | If exists, then update special fields in internal package. ([Update object structure](/UKz2SZrkSt-XwgG8iFt0zA))
> Also can include custom fields for  special events
> 
Example: 
```
{
    name: String,
    ?update: updateObject
}
```
## List of events
| API  | Name of event          | Description |
| :--: | ---------------------- | ----------- |
| null | beginProcess           ||
| null | endProcess             ||
| null | changeConversationFlow ||
| null | startCall              ||
| null | endCall                ||
| null | endSession             ||
| null | sendMessage            ||
| null | timeoutSession         ||
| null | changeEndMessage       ||
### Send message

This event using for sending message to entity.
> If this event catch pack without messageId, then it is new message. This message will be sended fron bot entity
> 
| field | description |
| ----- | ----------- |
| message |  Standart internal message object [InternalMessageObject](/@9pOGaLzOSNmFnnEG6Et3LA/HJ-gRcjrS) |

Example:
```
{ 
    name: 'sendMessage',
    message: InternalMessageObject
}
```
### Session timeout

This event using for sending message to entity.

| field | description |
| ----- | ----------- |
| value | Value on which must be changed session.sessionTtl field|

Example:
```
{ 
    name: 'timeoutSession',
    value: Number
}
```
### Change EndMessage text

This event using for change [End message](/0L723p8hTqqlQpKOXa8pZw) for special entity in session.

| field | description |
| ----- | ----------- |
| entityId | |
| message  |  Standart internal message object [InternalMessageObject](/@9pOGaLzOSNmFnnEG6Et3LA/HJ-gRcjrS) |

Example:
```
{ 
    name: 'sendMessage',
    entityId: Number,
    message: String
}
```
### Process end

In this case we set for all entities is session default end session message

Example:
```
{ 
    name: 'endProcess',
}
```

### Start call

This event change session.typId and sends this message further along the logic of the bot
| field | description |
| ----- | ----------- |
| value  | Object with special data for end platform |
Example:
```
{ 
    name: 'startCall',
    value: Object
}
```