Client is a UK based design and production service company. They are known for creating fonts with a distinctively human character. They provide a strong library of fonts and also provide a service centred around good design.
- The client wants Shopify Salesforce integration to combine Shopify store of client with their Salesforce instance. They wanted to store the purchase information like name, company, email, phone number, address etc from Shopify into Salesforce and create a closed Opportunity for the sale with product and price information. Client also wanted us to check for duplicate records before creating them in Salesforce and check if Accounts and Contacts are to be created or not.
- There was also a requirement to upload previous years Sales data into Salesforce.
- The inserted Contacts were also synched with mailChimp to send regular emails to the appropriate customers of the client.
As per our analysis of the given requirements, we created an Apex batch class to fetch the data from Shopify API and insert them in Salesforce org. This Apex batch was designed to get only recently created/updated orders from Shopify API. We scheduled this batch to run as per client requirement.
Shopify API is REST based API. We received the callout response in JSON format. From the received response, we mapped the required fields in different objects to create records in their respective objects in Salesforce.
As per client’s requirements of Shopify Salesforce integration, we inserted two types of Account records in Salesforce instance based on returned JSON response.
- Business Account (Standard Account).
- Person Account.
To add Contacts’ emails who opted for email marketing, we fetched these Salesforce records using SOQL. After that we scheduled the MailChimp job to run once in a day to sync the Contacts’ email with MailChimp.