---
# System prepended metadata

title: Immediate message

---

# Immediate message

* Immediate message never will start the session by self
* Immediate message from bot side
* Immediate message always last

Q1: If we click on proactive message which have follo-on message, should we push Immediate message?
Q2: If we click on proactive message which start session, should we push Immediate message?

## DB
Setup in collection rakeLiveChat_Bots

```
{
    botId: 45,
    immediateMessage: String
}
```

## Admin service UI
![](https://i.imgur.com/J8V0KNp.png)

## Logic

### Case widget without proactive message

* After click on widget button we maximized it and push immediate message like first message

![](https://i.imgur.com/KUWo3jV.png)


### Case widget with proactive message

We have next proactive messages:
```
{ proactiveRuleId: 1, text: 'Proactive rule 1' },
{ proactiveRuleId: 2, text: 'Proactive rule 2' },
{ proactiveRuleId: 3, text: 'Proactive rule 3' },
```

1. proactiveRuleId 1 was triggered
2. We open widget and will see 
    ![](https://i.imgur.com/7H9I79g.png)
3. Minimized it and trigger proactiveRuleId 2
4. Open widget
    ![](https://i.imgur.com/GAoYQID.png)
5. User send first message and we start session
