---
title: "Add or update lead data in Salesforce for new Shopify orders"
description: "Easily keep your purchase data up to date in Salesforce with automation. "
image: "https://images.ctfassets.net/lzny33ho1g45/4rKbu9OECtciY3xOpq7FBR/d1260bf9441943748a41158f714ab885/Group_12433.jpg"
---

# Add or update lead data in Salesforce for new Shopify orders

Easily keep your purchase data up to date in Salesforce with automation. 

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. 

## 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](https://help.shopify.com/en/manual/customers/manage-customers) walks you through locating your Customer settings and creating a new Customer if one hasn't been created already.

## 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. 

### 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.)

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**. 

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. 

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. 

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.)

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. 

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.

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. 

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. 

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.

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.

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. 

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. 

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.

### 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**. 

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.

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.

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: