Salesforce to Sage200 Opportunity to Order Download
This integration downloads opportunities from Salesforce to create SOP Orders in Sage200.
The opportunity download has the following broad steps:
- Queries Salesforce for 'unsynced' opportunites.
- Creates Customer records for Salesforce accounts without a customer in Sage.
- Creates the O/E Order in Sage.
- Filter erroneous records, flags the order as synced and writes the Sage order number to the Opportunity.
Sage200 Requirements
The integration requires a single Analysis Code on the SOP Order record.
- SalesforceID - Used to store the Salesforce ID for the Opportunity. This isn't strictly necessary, but required if you were to update the opportunity with a status such as 'Shipped' or the products with shipped quantities.
Salesforce Requirements
In order to flag/indicate which opportunities to integrate into Sage two custom fields should be added to the Opportunity object.
- IsSyncedYesNo - This is a field which we will check after any order has been successfully integrated.
- OrderNumber - This is a field will be used to record the Sage Order Number against the Opportunity.
Create An Opportunity
Create an opportunity with one or more of the products synced from Sage200.
Read Transform
The Read transform queries Salesforce to obtain all Opportunities modified in the last 20 days which the IsSyncedYesNo field is not checked.
See Filtering Records for more information on using the OSQL language.
Options Tab
Field Mapping
Whenever IMan connects to Salesforce it queries the Salesforce meta data (objects, the relationships between the objects and object fields). One-many object relationships are shown as options in the entity drop down (see Reader Entity Relationships).
To reduce unnecessary complexity only the Opportunity (mandatory) and Line Items entities have been included.
The field list grid includes all the fields defined on the entity in addition to all fields from entities with a one-to-one relationship. To successfully integrate orders the integration is including the custom SageAccount field (created for the Sage300 Customer/VEndor & Contact Upload to Salesforce).
Map & Customer Import
The integration's next action is to create new customer's should they not exist in Sage.
The customer connector creates new Customer records.
Order Import
Orders are then created. The integration only maps the key fields necessary to create the order.
Filter, Map & Salesforce Update
These next three transforms perform the update to the Opportunity to flag if the order was integrated or not.
Filter Transform
Filters unsuccessful records.
Map Transform
Adds a field necessary to check the IsSyncedYesNo field.
Salesforce Connector
Writes the Order Number and flags the IsSyncedYesNo field.
Options Tab
Note the Update Operation is set to Update only. The Opportunity Id field will be used to identify which opportunity to update.
Field Mapping Tab
Updated Opportunity
The IsSynced and Order Number fields should have been updated.