# Events

Conversations in Rasa are represented as a sequence of events. This page lists the event types defined in Rasa Core.

> **Note**  
> If you are using the Rasa SDK to write custom actions in python, you need to import the events from `rasa_sdk.events`, not from `rasa.core.events`. If you are writing actions in another language, your events should be formatted like the JSON objects on this page.

## General Purpose Events

### [Set a Slot](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#set-a-slot)  
**Short**  
Event to set a slot on a tracker  
```json  
ev = {"event": "slot", "name": "departure_airport", "value": "BER"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker._set_slot(self.key, self.value)  
```

### [Restart a conversation](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#restart-a-conversation)  
**Short**  
Resets anything logged on the tracker.  
```json  
ev = {"event": "restart"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker._reset()  
    tracker.trigger_followup_action(ACTION_LISTEN_NAME)  
```

### [Reset all Slots](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#reset-all-slots)  
**Short**  
Resets all the slots of a conversation.  
```json  
ev = {"event": "reset_slots"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker) -> None:  
    tracker._reset_slots()  
```

### [Schedule a reminder](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#schedule-a-reminder)  
**Short**  
Schedule an intent to be triggered in the future.  
```json  
ev = {  
  "event": "reminder",  
  "intent": "my_intent",  
  "entities": {"entity1": "value1", "entity2": "value2"},  
  "date_time": "2018-09-03T11:41:10.128172",  
  "name": "my_reminder",  
  "kill_on_user_msg": true,  
}  
```  
**Effect**  
When added to a tracker, Rasa Core will schedule the intent (and entities) to be triggered in the future, in place of a user input.

### [Cancel a reminder](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#cancel-a-reminder)  
**Short**  
Cancel one or more reminders.  
```json  
ev = {  
  "event": "cancel_reminder",  
  "name": "my_reminder",  
  "intent": "my_intent",  
  "entities": [  
        {"entity": "entity1", "value": "value1"},  
        {"entity": "entity2", "value": "value2"},  
    ],  
  "date_time": "2018-09-03T11:41:10.128172",  
}  
```  
**Effect**  
When added to a tracker, Rasa Core will cancel any outstanding reminders that match the `ReminderCancelled` event.

### [Pause a conversation](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#pause-a-conversation)  
**Short**  
Stops the bot from responding to messages.  
```json  
ev = {"event": "pause"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker) -> None:  
    tracker._paused = True  
```

### [Resume a conversation](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#resume-a-conversation)  
**Short**  
Resumes a previously paused conversation.  
```json  
ev = {"event": "resume"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker) -> None:  
    tracker._paused = False  
```

### [Force a followup action](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#force-a-followup-action)  
**Short**  
Instead of predicting the next action, force the next action to be a fixed one.  
```json  
ev = {"event": "followup", "name": "my_action"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker.trigger_followup_action(self.action_name)  
```

## Automatically tracked events

### [User sent message](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#user-sent-message)  
**Short**  
Message a user sent to the bot.  
```json  
ev = {  
    "event": "user",  
    "text": "Hey",  
    "parse_data": {  
        "intent": {  
            "name": "greet",  
            "confidence": 0.9  
        },  
        "entities": []  
    },  
    "metadata": {},  
}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker.latest_message = self  
    tracker.clear_followup_action()  
```

### [Bot responded message](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#bot-responded-message)  
**Short**  
Message a bot sent to the user.  
```json  
ev = {"event": "bot", "text": "Hey there!", "data": {}}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker.latest_bot_utterance = self  
```

### [Undo a user message](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#undo-a-user-message)  
**Short**  
Undoes all side effects that happened after the last user message.  
```json  
ev = {"event": "rewind"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker._reset()  
    tracker.replay_events()  
```

### [Undo an action](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#undo-an-action)  
**Short**  
Undoes all side effects that happened after the last action.  
```json  
ev = {"event": "undo"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker._reset()  
    tracker.replay_events()  
```

### [Log an executed action](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#log-an-executed-action)  
**Short**  
Logs an action the bot executed to the conversation.  
```json  
ev = {"event": "action", "name": "my_action"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker.set_latest_action_name(self.action_name)  
    tracker.clear_followup_action()  
```

### [Start a new conversation session](https://legacy-docs-v1.rasa.com/1.7.0/api/events/#start-a-new-conversation-session)  
**Short**  
Marks the beginning of a new conversation session.  
```json  
ev = {"event": "session_started"}  
```  
**Effect**  
When added to a tracker, this is the code used to update the tracker:
```python  
def apply_to(self, tracker: "DialogueStateTracker") -> None:  
    tracker._reset()  
```

**I can help you get started with Rasa and answer your technical questions.**
