# Desk events

## Introduction

In order to improve the integration of the iAdvize console with third-party web applications (such as CRM), the desk is able to send events via the postMessage API of the browser.&#x20;

These events concern conversations that arrive and leave the iAdvize desk but also when updates occur on visitors.&#x20;

They allow integrators to react to these events and, for example, to adapt the interface of their tool to what is happening within the iAdvize console. For example, we can imagine the following use cases:&#x20;

* Show/hide the iAdvize console when conversations arrive in the console or when there are no more conversations.&#x20;
* Open the CRM customer record related to the visitor in conversation who has the focus in the iAdvize console.

## Events lifecycle diagram

<figure><img src="https://76519009-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dwvuSeenw12Wd9Vfpf%2Fuploads%2FUx5JFJpAVoRf5aDQBYWc%2FScreenshot%202023-07-03%20at%2015.50.23.png?alt=media&#x26;token=ebe6db09-bbf5-4117-a1cc-781f8e8c7b0d" alt=""><figcaption></figcaption></figure>

The description and the payload of events can be viewed in the [Reference](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/desk-events/reference).


---

# 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://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/desk-events.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.
