> For the complete documentation index, see [llms.txt](https://docs.bird.com/connectivity-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bird.com/connectivity-platform/salesforce-sales-service-cloud/sync-messagebird-conversations-to-salesforce.md).

# Sync MessageBird conversations to Salesforce

In this article, you will learn how to sync existing conversations on the MessageBird platform to your Salesforce instance.&#x20;

## Get all MessageBird conversations <a href="#h_01f4scshk9xpenaed4znb46vbn" id="h_01f4scshk9xpenaed4znb46vbn"></a>

To bring all of your MessageBird conversations into Salesforce, we run a batch process in the developer console. You’re required to do this operation the first time that you install the plugin (to retroactively get existing conversations).

1. Click the gear icon on the top-right-hand corner of your page.
2. Click **developer console**.
3. Copy-paste the code. It will look similar to this:

<pre><code><strong>mbird.GetAllConversationsBatch c1 = new mbird.GetAllConversationsBatch();
</strong>c1.configurationName = ‘mbird__MessageBird'; //QualifiedApiName of the configuration created in the setup screen.

Database.executeBatch(c1);
</code></pre>

&#x20;

## Get all MessageBird conversation messages <a href="#h_01f4scttntcn1wyg5t4yabjdqg" id="h_01f4scttntcn1wyg5t4yabjdqg"></a>

To bring all of your MessageBird conversation messages into Salesforce, we run a batch process in the developer console.

1. Click the gear icon on the top-right-hand corner of your page.
2. Click **developer console**.
3. Before getting all the messages, run the batch to get all conversations, as we get messages for each conversation in this batch.
4. Copy-paste the code. It will look similar to this:

<pre><code><strong>mbird.GetAllMessagesBatch c2 = new mbird.GetAllMessagesBatch();
</strong>c2.configurationName = ‘mbird__MessageBird'; //QualifiedApiName of the configuration created in the setup screen.

Database.executeBatch(c2);
</code></pre>

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.bird.com/connectivity-platform/salesforce-sales-service-cloud/sync-messagebird-conversations-to-salesforce.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.
