• Home

  • Automation with Zapier

  • Zapier tutorials

Zapier tutorials

6 min read

Add or update lead data in Salesforce for new Shopify orders

By Ellie Huizenga · March 14, 2023
A hero image of the Salesforce app logo connected to the Salesforce app logo on a light blue background.

That moment when a lead becomes a customer is the best news—it means you've successfully made a sale. But now you want to turn that customer into a repeat buyer. You need to enrich your lead data so that customer gets the right nurture content. 

In this tutorial, we'll show you how to add or update your lead data in Salesforce when you get a new Shopify order. That way, you can act on the most up-to-date customer information—and make even more sales. 

New to Zapier? It's workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with thousands of apps to build and automate anything you can imagine. Sign up for free.

Before you begin

To set up this Zap using information unique to your store, log in to Shopify, and make sure that at least one Customer has been created. This guide from Shopify walks you through locating your Customer settings and creating a new Customer if one hasn't been created already.

Both Shopify and Salesforce are premium apps—available on Zapier's paid plans. Learn more about premium apps

How to connect Shopify and Salesforce

Zapier lets you create automated workflows called Zaps, which send your information from one app to another. You can create your own Zap from scratch without any coding knowledge, but we also offer quick templates to get you started. 

If you'd like to start with a template, click on the Zap template below to go to the Zap editor. You'll need to create a Zapier account if you don't already have one. Then, follow the directions below to set up your Zap. 

Add or update lead data in Salesforce for new Shopify orders

Add or update lead data in Salesforce for new Shopify orders
  • Shopify logo
  • Filter by Zapier logo
  • Salesforce logo
Shopify + Filter by Zapier + Salesforce

Also, if you're new to search actions, this tutorial will be a gentle intro. Search actions help update existing data in your apps and prevent duplicate records. 

Set up your Shopify trigger

First, set up your trigger—the event that starts a Zap. 

If you're creating a Zap from scratch, select Shopify as the app, New Paid Order as your event, and click Continue. (If you're using our Zap template, this part will already be set up for you.)

Shopify chosen as the app and New Paid Order as the Event

Next, connect your Shopify account to Zapier. If you have yet to connect Google Contacts to Zapier, sign into your Google account when prompted. Otherwise, select your Shopify account from the dropdown menu and click Continue

Now, set up the trigger. In the Payment Status field, select paid from the dropdown menu—this means that your Salesforce lead will only be updated if the payment is marked as paid. 

For Order Status, select any from the dropdown. If you only want Salesforce to update a lead if the order status is closed, select closed from the dropdown instead. 

For the Fulfillment Status field, select any from the dropdown. This means your lead will be updated in Salesforce whenever a new payment is made, regardless of whether the product has been sent. Press Continue

Choosing the payment, order, and fulfillment status

Next, test your trigger. Zapier will look for a recent payment in the Shopify account you just connected. You'll use whatever Zapier finds to set up the rest of your Zap. 

A new paid order was found in Shopify

Once you see a success message, check the results and ensure you have the data you want. If everything looks good, press Continue

Set up your Salesforce search action

Next, we'll set up our first Salesforce action step, which will check for existing Salesforce contacts that match the Shopify sample the previous trigger step found.

Check out our guide on how to get the most out of Zapier search steps.

If you're creating a Zap from scratch, search for and select Salesforce as your app, Find Record as your event, and click Continue. (The Zap editor will do this for you if you're using our Zap template.)

Salesforce chosen as the app and Find Record as the event

Next, connect your Salesforce account or select an existing Salesforce account from the dropdown and click Continue

Now you need to specify what you want Zapier to look for within your Salesforce contacts. Click on the dropdown beneath Salesforce Object, then select the contact property (like email or phone number) you want your search to focus on.

Pro tip: Pick a contact property less prone to human error, such as an email address. For example, the chances are low that the lead will enter their email address incorrectly when purchasing a product.

Once you've selected your Salesforce contact property, Zapier will ask for a search value, which is the information your Zap will match across apps. To pass information from Shopify to Salesforce, you must map a dynamic value to the Salesforce Object and Field to Search by fields.

Email chosen as the object, field to search by, and search value

In our example, we want Salesforce to look at the email address of our contacts in Shopify, so we've selected Contact point email in the Salesforce Object field and Email address in the Field to Search By. We then selected the email address found in our Shopify trigger step for our Search Value.

If you're using our Zap template, you'll notice that Create HubSpot Contact if it doesn't exist yet? is checked.

Create Salesforce Record if it doesn't exist yet is checked

Certain apps, like Salesforce, allow you to search for existing data and create new items in the same step, which saves you setup time.

Since this option is checked, the Zap editor will prompt you to customize what you want in your new contact record.

Note: A new contact record will only be created if there's no matching email found. Otherwise, this Zap will continue onto the next step.

To pass information from Shopify to Salesforce, map fields from your Shopify trigger to the corresponding Salesforce fields. To do this, click in a field and select the data you want to use from your previous step from the dropdown.

Email chosen as the dynamic value

Note: These fields are customized based on the fields you have set up in each account. You don't need to fill out every field listed in the Zap editor—just the ones you need.

Once you've customized what will go in your new contact record, click Continue

Now test your search action. Zapier will search for an existing Salesforce contact. When you see a success message, check your test data carefully. If Zapier found a Salesforce contact that matches the test data in Shopify, _zap_data_was_found will be true, and the Zap will continue,  updating that contact in a later step. If Zapier finds nothing, this will be false, and a new contact record will be created with the updated payment.

A record was sent to salesforce

Click Continue.

Set up your filter step

If your _zap_data_was_found is true, the Zap will continue onto this step—which filters your existing Salesforce contacts so they can be updated correctly. If your _zap_data_was_found is false, a new Salesforce contact will be created in the step above with the updated payment included. 

If you're using our Zap template, a filter step will already be set up for you. If you're setting up this Zap from scratch, choose Filter by Zapier as your action app.

Filter by Zapier chosen as the app

Then, set up your filter by selecting Zap Data Was Found Status from the Choose field dropdown and (Boolean) Is true from the Choose condition dropdown.

Only continue is Zap Data Was Found and Boolean is true

When you're ready, click Continue to test your filter. If your filter behaves how you expected it to, click Continue again. If you still need to, adjust your filters and retest until you get the expected result.

Success message saying your Zap would have continued

Set up your second HubSpot action step

Now you'll set up the final step in this Zap. If Zapier finds an existing contact in Salesforce, this action will update that contact record. If your Zap did not find a record in Salesforce, it won't move forward to this step since it will have already created a new Salesforce contact with the payment info included in their account in the first action step. 

If you're creating this Zap from scratch, search for and select Salesforce as your action app, Update Lead as your action event, and click Continue

Salesforce chosen as the app and Update Lead as the event

Next, select your HubSpot account from the dropdown menu and click Continue

The Zap editor will prompt you for the Lead to Update. This is the piece of information Zapier uses to identify which Salesforce contact to update. Click in the Lead to Update field and choose the correct dynamic field from Salesforce in the dropdown—this could be ID, email, or phone number—whatever identifying information you want to use.

Email address chosen as lead to update

 Learn more about using search steps to update existing records.

Now you can customize the rest of this step according to the contact properties you want to update in Salesforce. When you're done, click Continue

Finally, test your update action.

A success message about sending a lead to Salesforce

Testing this step will update an existing contact in Salesforce. We recommend using dummy customer info in your sample data, or you can click Skip test if you don't want to add test contacts to your account (though testing your Zap is always a good idea to ensure it's working correctly). If you test your action and see a success message, check your Salesforce account and verify that your information passed through correctly. 

Then you're ready to use your Zap.

Turn customers into repeat customers with enriched lead data

Keep your lead data up to date in real time by connecting your Shopify account to your Salesforce account. Now, you're instantly ready to send customers the right upsell and cross-sell campaigns. 

Get started and try the Zap yourself:

Add or update lead data in Salesforce for new Shopify orders

Add or update lead data in Salesforce for new Shopify orders
  • Shopify logo
  • Filter by Zapier logo
  • Salesforce logo
Shopify + Filter by Zapier + Salesforce

Related reading:

  • 6 ways to automate your Shopify store

  • Popular ways to automate Salesforce

  • How to add new Google Form responses to Salesforce

  • Automatically post new Shopify store items to Pinterest

  • How to connect Google Sheets to Salesforce

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
See how Zapier works
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'