Replicator for Salesforce is a method of sharing your Salesforce data to an on-premises database or application. Case SObject data from Salesforce is the most common data to sync. However, any SObject data can be synced using custom configurations in the agent.xml file that is created upon installing the Replicator Agent.

Get started with Replicator for Salesforce

To set up Replicator for Salesforce, follow these steps:


Install the Replicator Agent

Follow the steps to install the Replicator Agent and, on Step 5 of the setup process, choose the Manual Configuration (advanced) option from the Replicator Type dropdown.

Open the agent.xml file in a text editor

Locate the agent.xml file in the directory you specified when installing the Replicator Agent. Then, open the agent.xml file in a text editing application.

Configure your agent.xml file

Use the example agent.xml below to configure data replication from Salesforce to a database. Update the following directives with the information applicable to you per the descriptions in the table below:

DirectiveDescription
<message_connection>

URL for the Perspectium Mesh (MBS) cloud server that you will connect to. You can request this information from Perspectium Support.

queue = Queue name in the Perspectium Mesh (MBS) where data coming out of Salesforce should be shared to

password = Password used to connect to your Perspectium Mesh (MBS) server

user = Username used to connect to your Perspectium Mesh (MBS) server

<decryption_key>
Decryption key of 24+ characters used to decrypt data synced using the Perspectium Mesh (MBS)
<database_type>

Type of local database you are syncing your Salesforce data to

To see which databases are supported for Salesforce Replicator, see Replicator Agent Supported Databases.

<database_server>
URL for your database. If your database is installed on your local machine, set this value to localhost.
<database_user>
Username used to connect to your database
<database_password>
Password used to connect to your database
<database>
Name of your database
<schema_connection>

URL for your Salesforce organization

user = Username used to log into your Salesforce org

password = A concatenation of the password used to log into your Salesforce org plus your Salesforce security token

client_id = Salesforce Consumer Key for the Perspectium Replicator app

client_secret =Salesforce Consumer Secret for the Perspectium Replicator app

(info) NOTE: You can access your Salesforce Consumer Key and Consumer Secret by navigating to Setup > Apps > App Manager > Perspectium Replicator > View.


Example agent.xml

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
<agent>
<max_reads_per_connect>4000</max_reads_per_connect>
<polling_interval>30</polling_interval>

<subscribe>
<task>
<task_name>salesforce</task_name>
<message_connection queue="psp.out.replicator.mysalesforce" password="admin" user="admin">amqp://example.perspectium.net</message_connection>
<handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
<decryption_key>The cow jumped over the moon</decryption_key>
<database_type>mysql</database_type>
<database_server>localhost</database_server>
<database_port>3306</database_port>
<database_user>root</database_user>
<database_password></database_password>
<database_parms>characterEncoding=UTF-8</database_parms>
<database>solutions</database>

<schema_connection user="your_sfuser@yourcompany.com" password="salesforce1NxOwgnOlIH11JIfXC9Ob57Dc"
client_id="3MVG9uudbyLbNPZO0CYuZCvodrGD7QFWe6aPZY54i2cn4BqjhcuaSCYM2hgWI297gwSCr.5XEfy3WlyB4zXcI"
client_secret="8290250609080749993">https://login.salesforce.com/services/oauth2/token</schema_connection>

<primary_key>Id</primary_key>
<skip_database_creation/>
<date_time_format>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</date_time_format>
</task>
</subscribe>
</agent>
</config>