Send an updated or new Shopify Product to a Salesforce Product and Pricebook entry

πŸ”§ Setup is needed:
βš™οΈ Configure your Salesforce account
πŸ”Œ Connect MESA with Salesforce
βž• Add the Price Book ID value
βœ… Save and enable your workflow to start automating!

This template sends a product from Shopify to Salesforce whenever a product is created or updated. You can now sync crucial information across your two major platforms.

❗ Required: This template works with Salesforce plans that support products, product schedules, price books and orders:  Professional, Enterprise, Unlimited, Developer and Performance editions. Ensure you have one of these plans before continuing. Learn more.

Let’s get started πŸš€

Configure your Salesforce account

This workflow requires some customization in your Salesforce account.
1. Log in to your Salesforce account, then click on the gear icon in the top right corner to go to Setup.

2. From the left hand menu, click on Objects and Fields, then Object Manager.

3. Click on Product, then click Fields & Relationships.

4. Click the New button, and select Text for the field type, then hit Next.

5. Enter Shopify Variant ID for Field Label,  Shopify_Variant_ID__c for Field Name, 100 for the Length, and check the box for  External ID. Click the Next button after filling in the fields.

6. Hit Next again. Ensure your field is visible to the profile that the credential account belongs to which is the account used when creating the Salesforce credential.
7. Hit Next again, then hit Save.

Set up the workflow

1. Go back to the workflow in the MESA dashboard. In the Salesforce: Query Product action, create a credential connecting MESA to your Salesforce account. Fill out the following fields:

Continue reading if you're unsure how to fill out these fields.

Note: If you are connecting to a Salesforce sandbox, you should replace login.salesforce.com with test.salesforce.com for the two URLs above.

Not sure how to fill in the Client ID and Client Secret? Log in to your Salesforce account, then click on the gear icon in the top right corner to go to  Setup.

In the left hand menu, navigate to Apps and then App Manager.

Then click on New Connected App button.

Enter Mesa Connected App under the Connected App Name. The API Name field will then auto-populate. 

Enter a valid email for Contact Email.

Ensure Enable OAuth Settings is checked. Enter this URL https://app.getmesa.com/apps/mesa/oauth/redirect-token for Callback URL.

Then select all items under Available OAuth Scopes and hit the right arrow under Add to move all of them to Selected OAuth Scopes.

Do not alter any other fields, then hit the Save button at the top. 

Note: After saving, you may then see a warning that changes can take up to 10 minutes to take effect.

After saving, copy the values for Consumer Key and Consumer Secret.

2. Go back to the workflow and paste the value for Consumer Key into the Client ID field, and the value for Consumer Secret into Client Secret.

3. Click the Authenticate with Salesforce button. You may be asked to login to your Salesforce account. Once logged on, you will get a prompt asking for access. Hit Allow.

You will be taken back to your workflow with a new Salesforce credential created. 

4. In these 3 actions below the previous one, select the existing credential you just created.

  • Salesforce: Create or Update Product
  • Salesforce: Query Pricebook Entry
  • Salesforce: Create or Update Pricebook Entry 

5. In the  Mapping to Salesforce: Create or Update Pricebook Entry step, add the value of the Pricebook2Id key.

Not sure where to find this Price Book ID's value? Log in to your Salesforce account and go to the Price Books page. Type in Price Books in the search bar and located Price Books under the Items label.

Click on Standard Price Book.

Locate the URL for the Price Book, then copy the ID in the URL, between r/ and /view. For example, if your URL is https://ab11.force.com/lightning/r/01s2E000002pddCQAQ/view, the ID would be 01s2E000002pddCQAQ.

6. At the top of the workflow, hit the Save button to save your changes.

7. Hit the Enable button when you are ready to start using the workflow.

βœ‹ Still have questions? We got you. Email us at contact@getmesa.com where actual humans are on standby 24/7, ready to help.