Sync MessageBird conversations to Salesforce

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

Get all MessageBird conversations

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:

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

Database.executeBatch(c1);

Get all MessageBird conversation messages

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:

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

Database.executeBatch(c2);

Last updated