How to integrate data between CRM and ERP systems
This article describes how to synchronize accounts from the CRM system (Salesforce) with contacts from the ERP system (NetSuite). This article conditionally divided into two parts. The first one – described accounts synchronization, the second one – contacts synchronization.
Part 1 - Account Synchronization
The Salesforce connector gives IConduct users access to Salesforce entities for quick and smooth Salesforce integration with other core systems of their company. To create a new connection, navigate to the Connections folder, click the New button, find Salesforce connector. Click on it and create the connection. You can find the detailed instruction here.
Creating a new interface is the first step in the process of establishment of a scheduled procedure that includes a variety of tasks connecting two (or more) specific applications. To create a new interface, select Interfaces in the Navigation Panel and click New on the Toolbar. The Interface page opens. For more information navigate here.
To create a new task, select the created interface. Click on it, then click on the Task folder, and click the New button. Create a new task. For more information navigate here.
This step is used to import accounts into the IConduct Schema for transfer or further manipulation. To create this step, navigate to Interfaces> Your Interface> Tasks> > Steps >New >New Import Step. More information about the Import step, you may find here.
Select the Salesforce connection. Fill in the Query box according to the Salesforce SOQL language pattern. In this step, we import account, named Salesforce, with all mentioned fields. The example is below. More information how to write Query, you can find here.
Click Test Query and save the step.
Navigate to the Schema folder. Add columns that are relevant to the query fields from the previous step.
For example, we import website, phone, type columns and so on. In this case, we need to create those columns in the schema for further mapping.
Warning: In our case, the account that we import may have several addresses. You can add new rows with addresses to the schema or overwrite address in the existing row. Add field override to the schema. If the value of this field is False (by default), then a new raw will be added. If the value is True, a raw with values will be overwritten. This rule related to all objects with multiple values.
Navigate to the Schema Mapping folder and map columns by dragging them to each other.
The result will be as following:
NetSuite accepts countries in its special format. For example, NetSuite requires France to be passed in as _france. That’s why the user needs to create Replace manipulate step to convert country field values in a proper format. You can find all countries formats here. To create manipulate step select Interfaces > InterfaceName > Tasks > TaskName > Steps. On the toolbar, click New >New Manipulate Step and select Replace step. Select billing country in the Source Column and Target Column fields. In the Source Elements field write a country, you want to convert. In the Target Elements write NetSuite country format. The result will be as following:
This step is intended for synchronizing account entity from Salesforce and customer entity from NetSuite. Then we will export customers to NetSuite. To create the Export step, navigate to the Interfaces> Your Interface> Tasks> > Steps >New >New Export Step. A new export step window will be opened. To export your data, follow the steps below:
- Select the NetSuite connection from the Connection drop-down list.
- Select the Customer entity from the Entity Name drop-down list.
- Choose the action, you want to perform. In this case, Upsert action depends on the foreign key.
- Fill in the Schema Column field. ID is the foreign key.
- Enter the external ID in the Source Column field.
If the foreign key and external ID match, then data in the schema will be updated. If it doesn’t match – the data will be inserted.
The view will be as following:
- Save the step and proceed with mapping.
Navigate to the Schema Mapping folder and map columns by dragging them to each other. The result will be as following:
Note: Map ID and external ID to define a relation between account and customer.
Part 2 - Contact Synchronization
Create Import step as you did in step 4. This step is intended for importing contacts from the Salesforce platform. But we need contact with a certain email. That’s why the query looks as follows:
The user can filter the query by any parameters.
Navigate to the Schema Mapping folder and map columns by dragging them to each other. The result will be as following:
In this step we will import customer’s internal Id from NetSuite, using Salesforce account Id that was defined as external Id in the previous Task. To create this step, select the NetSuite connection. Update action allows to get customer’s internal Id from NetSuite.
In this step the user should map only one column. Drag internal Id to account Id.
In this step, we will create a contact in the NetSuite platform. Select your NetSuite connection. Entity name – contact, because we will export contacts to the NetSuite platform. Upsert action will update contact or insert a new one.
Navigate to the Schema Mapping folder and map columns by dragging them to each other. The result will be as following:
In this step, we will attach contact from the NetSuite to account from the Salesforce. To create this step, fill in fields as shown below.
Filter Expression field allows filtering steps that were successfully executed:
- ’1’ means error
- ’2’ means success
You can see status in the transaction logs, which are in the Transactions folder.
Select your NetSuite connection. Underneath enter entity which executes contact connection to the account. Then select Insert action.
Navigate to the schema mapping folder and map columns as described below.
Execute Entity ID – is ID of an entity that should be mapped. In our case, it’s a contact ID.
Account ID – ID of an entity to which we mapped contact ID.
Customer record type – a type of an object to which we attached another object.
Navigate to the Transactions folder and click execute button.
Wait till the execution is finished. Then you will receive the table with execution lines. Each line is marked in color. The color of the line depends on the interface execution result - error/success/failure:
- Errors lines are red.
- Successes are marked in green.
- Failures are marked in yellow.
Also, you will see numbers in the field Success (S). In our case it’s – 3. This number indicates the successful steps: import account, import contact and joining contact to account.
Log to NetSuite. There you will find a new account that was created in Salesforce and exported to NetSuite. Account name is Salesforce.