How do I send cart abandonment emails using gmail?

Don't miss that sale! In this article we will outline how the WSM/Zapier integration can send abandoned cart emails to your customers.


Prerequisite Work

  1. Zapier account
  2. Web Shop Manager subscription at the Grow plan or above
  3. Web Shop Manager Universal API key
  4. Google account and Google Sheets
  5. Creating your spreadsheet in Google Sheets
  6. Creating a Test Order in Building Status

Creating a cart abandonment Zap

  1. Action 1: Create a Trigger
  2. Action 2: Product Data Grouping
  3. Action 3: Parse the Customer Name
  4. Action 4: Parse the Product Titles
  5. Action 5: Formatting Product Titles
  6. Action 6: Create Spreadsheet Rows in Google Sheets
  7. Action 7: Set the Delay
  8. Action 8: Find Order
  9. Action 9: Filtering out orders no longer in Building
  10. Action 10: Creating an Abandoned Cart Email

Prerequisite Work

Before creating your Zap, we need to first set up a few prerequisites. Here is a list of things you'll need:

Creating Your Spreadsheet in Google Sheets

Once you have your Zapier account, WSM subscription, & Universal API key set up; it's time to identify what fields you will use in your Cart Abandonment emails. These fields contain the data you will use to personalize the cart abandonment emails. (think data like customer name, email, product name, etc.) For a full list of available fields, please visit our What fields are available for cart abandonment Zaps? article.

After identifying the fields you'll use to draft your emails, it's time to set up the Google Sheet your Zap will use to store and retrieve the data.

  1. Sign into your Google account & go to: https://www.google.com/sheets
  2. Click the tile to create a new blank spreadsheet
    Goog_1
  3. Click into the Untitled spreadsheet field and name your file. 
    Goog_1=2
  4. Title your columns with the data fields you selected. Some column headers you'll want to include: Order ID, Date Modified, & Status. These data fields are important for ensuring the abandonment emails are sent as desired.
    Goog_2
  5. That's it. We're done with this sheet for now.

Creating a Test Order in Building Status

This is a small but important step. By using your email address to  create an order in building status, you will be able to test and see the cart abandonment email your customers will receive. Is this step 100% necessary? No. You COULD set up the cart abandonment emails without ever seeing the end result. But setting up this test order will make the process 100x easier and you'll be able to test your work as you go. Plus, setting up the test order takes less time than it took you to read this paragraph. The instructional video below is less than two minutes long and walks you through the steps of setting up and confirming a test order. 

 

Creating a Cart Abandonment Zap

Action 1: Create a Trigger

A trigger is a task that will poll WSM looking for information. The trigger will poll WSM for orders in a specific Order Status. For Cart Abandonment, we’re looking for orders with an Order Status of “Building”.

  1. Log into Zapier

  2. Click on the MAKE A ZAP buttonZapierArticle_1-1

  3. Now name your Zap. This can be done by clicking on the “Name your zap” text in the upper left-hand corner of the screen.ZapierArticle_2

  4. Next, you need to select the Web Shop Manager (0.1.0) app. If the Web Shop Manager (0.1.0) app isn’t visible, start typing “Web Shop Manager” in the Search apps... field and select Web Shop Manager (0.1.0) when it appears.
    ZapierArticle_3
  5. Now choose the trigger event, “New or Updated Order in Chosen Status". Then click the large, blue Continue button. ZapierArticle_4
  6. Select your site then click the large, blue Continue button (If you need to add your site, see step 6a below)
    ZapierArticle_5-1
    1. Do you need to add your site to Zapier?
      1. Click the Connect a new account button
        ZapierArticle_5a
      2. In the Zapier pop up, enter your site's FULL URL & WSM Universal API key. (Your API key is found in the System → Configuration → Integrations menu of your site)
        ZapierArticle_5b
        ZapierArticle_5c
  7. In the Set Up Trigger → Status menu, select Building then click the large, blue Continue button.
    ZapierArticle_6

  8. Now test your trigger! If everything has been set up correctly, you'll see a list of orders retrieved from your site. Each order will display the information your customer added at the checkout page.
    ZapierArticle_7 ZapierArticle_8 ZapierArticle_9
  9. Once you've confirmed the order data, you're done with setting up the trigger!
    Click the large, blue Continue button and we're onto Action 2: Product Data Grouping

Action 2: Product Data Grouping

This is the first of four actions for processing the order data retrieved from your site. In this action, you will identify and group all of the product related data for Zapier. Grouping the data by product will allow each product to create a line in your Google Sheet. These line items are required to support multiple products in your cart abandonment emails.

  1. In the right-hand side of the Action menu, click the "Format" tile.zap_add_1
  2. In the Action Event → Choose Choose an event dropdown, select "Utilities" . Then click the large, blue Continue button.zap_add_2
  3. In the Transform → Choose value... dropdown, select "Line Itemizer (Create/Append/Prepend)".zap_add_3
  4. In the Line-item(s) Group Name field, type in the title to be used for this group. The example image below titles this data group "Products".zap_add_4
  5. The Line-item Properties fields are where you'll map and group the product data. In the example image below only the Part Number, Product Image URL, & Product Title are used.
    To create a Line-item Property:
    1. Click into the left-side field & enter your line-item title. zap_add_5-1
    2. Click into the right-side field & select the corresponding product data from the product data retrieved in step 1. (you can use the search field to help find the data)zap_add_6
    3. Click the "+" to add an additional field. zap_add_7
    4. Here's how the product data line items look when completed. zap_add_8
    5. Once your desired product data line items have been created, click the large, blue Continue button. The Create Subtotal Property? and Decimal Places For Subtotal Values fields should be left to their default values.
  6. Click the Test & Review button to see your data now grouped by product.zap_add_9
  7. After successfully testing your product data line items, click the blue "+" button below Close and we're off to Action 3: Parse the Customer Name

Action 3: Parse the Customer Name

This is the second of four actions for processing the order data retrieved from your site. The order data retrieved from your site will have the customer's first and last name contained in a single data field. In this action, you will instruct Zapier how to extract just the first name from that field. Creating this first name data field will allow you to create a more natural sounding cart abandonment email.

  1. In the right-hand side of the Action menu, click the "Format" tile.zap_add_10
  2. In the Action Event → Choose an event dropdown, select "Text" then click the large, blue Continue button.  zap_add_11
  3. In the Transform → Choose value... dropdown, select "Split Text".zap_add_12
  4. Click into the Input → Enter text or insert data... field. Click on "New or Updated Order in Chosen Status in Web Shop Manager". Then select the Bill Address Name data field. zap_add_13
  5. Click into the Separator → Enter text or insert data... field and enter in the text [:space:] . zap_add_14
  6. Click into the Segment Index → Choose value... field and select "First". Then click the large, blue Continue button. zap_add_15
  7. Click the Test & Review button to confirm your output is the first name of your customer. zap_add_16
  8. After you successfully test your product data line items, click the blue "+" button below Close and we're off to Action 4: Parse the Product Titles

Action 4: Parse the Product Titles

This is the third of four actions for processing the order data retrieved from your site. In this action you are going to tell Zapier that the product title data type is text and that the product title list is comma separated. This will allow you format the product titles in your cart abandonment emails.

  1. In the right-hand side of the Action menu, click the "Format" tile. zap_add_17
  2. In the Action Event → Choose an event dropdown, select "Utilities" then click the large, blue Continue button. zap_add_18
  3. In the Transform → Choose value... dropdown, select "Line-item to Text" zap_add_19
  4. Click into the Input → Enter text or insert data... field and select your product titles from the step 2 Utilities dropdown. zap_add_20
  5. In the Separator → Enter text or insert data... field enter a comma "," (no leading or trailing spaces, no quotation marks, just the comma). Then click the large, blue Continue button. zap_add_21
  6. Click the Test & Review button to confirm your output separates the product names into separate items. 
    zap_add_22
  7. After you successfully test parsing your product titles, click the blue "+" button below Close and we're off to Action 5: Formatting Product Titles

Action 5: Formatting Product Titles

This is action four of four for processing the order data retrieved from your site. In this action you are telling Zapier to find the commas in your product title list and replace them with a line break. This action will allow the product titles in your cart abandonment emails to be displayed as an easy to read list.

  1. In the right-hand side of the Action menu, click the "Format" tile. zap_add_23
  2. In the Action Event → Choose an event dropdown, select "Text" then click the large, blue Continue button. zap_add_24
  3. In the Transform → Choose value... dropdown, select "Replace". zap_add_25
  4. Click into the Input → Enter text or insert data... field and select the "Output Text" from the step 4 Utilities dropdown. (you may have to click Show all optionszap_add_26
  5. In the Find → Enter text or insert data... field enter a comma "," (no leading or trailing spaces, no quotation marks, just the comma). zap_add_27
  6. In the Replace → Enter text or insert data... field enter [:newline:] then click the large, blue Continue button. zap_add_28
  7. Click the Test & Review button to confirm your output separates the product names onto separate lines. 
    zap_add_29
  8. After you successfully test parsing your product titles, click the blue "+" button below Close and we're off to Action 6: Create Spreadsheet Row in Google Sheets

Action 6: Create Spreadsheet Rows in Google Sheets

Now that Zapier is able to poll your site and retrieve the order data, we need to give it a place to store that data. That place? The spreadsheet you set up in Google Sheets while completing the Prerequisite work. 

  1. Click into the Search apps... field and search for "Google Sheets"
  2. Click on Google Sheets
    ZapierArticle_10
  3. In the Action Event → Choose Choose an event dropdown, Select Create Spreadsheet Row(s). Make sure you DO NOT select the Create Spreadsheet Row option.  zap_add_30
  4. Click the large, blue Continue button
  5. Click into the Google Sheets account → Choose an account menu and select your Google Sheets account
    zap_add_31
    1. If your account is not yet connected to Zapier, click the Connect a new account button and log into the Google account you used to create the spreadsheet in Google Sheets
  6. Click the large, blue Continue button
  7. Click into the three dropdown menus and select the appropriate values. (these menus are detailed below)
    zap_add_32
    1. Drive → Choose value... dropdown - Select the Google Drive account where you saved your spreadsheet.
    2. Spreadsheet → Choose value... dropdown - Select the spreadsheet created in the Prerequisite work.
    3. Worksheet → Choose value... dropdown - Select the worksheet page containing your column headers.
  8. Zapier connects to your Google Sheet account & brings in the column headers you set up in the spreadsheet. zap_add_33
  9. Now we have to map the order data to the column headers.
    Zapier retrieves the column headers from your spreadsheet. Zapier retrieves the order data from your site. Now Zapier needs to be told the which columns in the spreadsheet match the fields in the order data.
    Click into each field and select the corresponding data field from Step 1, New or Updated Order in Chosen Status in Web Shop Manager. Every data field available in the API will show up in these dropdowns. It can look overwhelming. Just take your time and find the right data for each field. When complete, your form should be fully populated and the data will be mapped!
    Here's a quick video showing how to map your order data:

    Mapped data will look like this: zap_add_34
  10. Once you've mapped your order data, click the large, blue Continue button
  11. Click the Test & Review button. 
    ZapierArticle_16
  12. You should see a success message in Zapier and new rows added to your Google Sheet!
    (one row per product)
    Success Message in Zapier:
    zap_add_35
    New rows added in Google Sheets:
    zap_add_36
  13. Don't get too excited, we're not ready to turn on the Zap yet! Click the blue "+" button below Close and we're off to Action 7: Set the Delay
    ZapierArticle_19

    Action 7: Set the Delay

    Why are we setting a delay? Every time one of your customers takes a product to the Checkout, an order is created with an Order Status of "Building". When your customer completes a transaction and clicks the Submit Order button, the Order Status is updated from Building → New. You don't want Abandoned Cart emails getting sent out to customers still in the checkout process! This delay is going to pause the Zap and prevent emails from being sent to customers that have completed checkout.

    1. In the right-hand side of the Action menu, click the "Delay" tile.
      ZapierArticle_20
    2. In the Action Event → Choose Choose an event dropdown, select "Delay For" then click the large, blue Continue button.
      ZapierArticle_21
    3. The next two menus are going to set the time delay duration. In the Time Delayed For (value) field, enter the numeric value of your delay. In the Time Delayed For (unit) menu, select the unit of measure. In the example image below, the time delay is set to 45 minutes. 
      ZapierArticle_22
    4. Click the large, blue Continue button
    5. Click the Test & Review button to make sure your delay is successful!
      ZapierArticle_23
    6. After you successfully test your delay, click the blue "+" button below Close and we're off to Action 8: Find Order

    Action 8: Find Order

    Now you will need to select how you’re going to find the Order(s) reported in the Trigger. This is done by having Zapier search for the Order ID.

    1. First, we need to select the Web Shop Manager (0.1.0) app. If the Web Shop Manager (0.1.0) app isn’t visible, start typing “Web Shop Manager” in the Search apps... field and select Web Shop Manager (0.1.0) when it appears.
      ZapierArticle_24
    2. From the “Action Event” dropdown, select “Find Order” and click the large, blue Continue button.
      ZapierArticle_25

    3. From the “Choose account” dropdown, select your website and click the large, blue Continue button.
      ZapierArticle_26
    4. Click on the Order ID drop down and you’ll see an option for Custom. Click Custom.
      ZapierArticle_27
    5. In the “New or Updated Order in Chosen Status in Web Shop Manager (0.1.0)” dropdown, select ID.
      ZapierArticle_28
    6. In the “Should This Step Be Considered A "success" When Nothing Is Found?” dropdown, select “False”. Then click the large, blue Continue button.
      ZapierArticle_29
    7. Click the Test & Review button
      ZapierArticle_30
    8. Confirm the order data is correct then click “Close”
      ZapierArticle_31
    9. After you successfully test your Find Order Action, we're off to Action 9: Filtering out orders no longer in Building

    Action 9: Filtering out orders no longer in Building

    Just a quick recap on order functionality. Any time your customer adds a product to the cart and proceeds to checkout, the system generates an order in Building status. When your customer completes the transaction, the order status is updated from Building → New. In this Action, we are going to remove the orders that were updated from Building → New. Don't want to send a cart abandonment email to customers who completed the purchase!

    1. Click the blue "+" button under Action 4
      ZapierArticle_32
    2. In the right-hand side of the Action menu, click the "Filter" tile.
      ZapierArticle_33
    3. In the first drop down, labelled “Choose field…”, select “Find Order in Web Shop Manager (0.1.0)”. Then scroll down and find the “Status” field and select it (you may have to click the Show all options button).
      ZapierArticle_34
      ZapierArticle_35
    4. In the middle dropdown list labelled “Choose condition…”, select “(Text) Contains”.
      ZapierArticle_36
    5. In the last field labelled Enter or select value…”, enter the term “building” (without the quotation marks). Then click the small, blue Continue button to test.
      ZapierArticle_37
    6. Once Zapier tests the filter step and shows a success, click on "Close"
      ZapierArticle_38
    7. After successfully testing your filter, click the blue "+" button. Our next step is Action 10: Creating an Abandoned Cart Email.

    Action 10: Creating an Abandoned Cart Email

    Now we have everything prepped to send out cart abandonment emails. All that's left is to construct the emails!

    1. Select Gmail from the App Event menu.
      zap_add_37
    2. In the dropdown menu labeled "Action Event → Choose an event", click Send Email. Then click the large, blue Continue button.
      zap_add_38
    3. In the dropdown menu labeled "Gmail Account → Choose an account...", select the account you want to use for sending the cart abandonment emails. Then click the large, blue Continue button. (If your account is not displayed, click the "+ Connect a new account" button and log into the desired account.)
      zap_add_39
    4. This one is the BIG ONE! There's going to be multiple steps. You're going to: map the order data to the email fields, add the body of the email using a mixture of order data and text, and add some organizational elements like a Reply To email or Mailbox Label. In the sub-steps below we'll break down each field and how to map it to order data or point out where you can add your custom email text.
      1. To:

        1. Click into “Enter text or insert data…” field

        2. Click Find Order in Web Shop Manager (0.1.0)

        3. Find and select the customer email (you may have to click the Show all options button).
          zgif

      2. Cc:

        1. There will not be a data value to select here. If there’s an email address you’d like copied to all the sent abandoned cart emails, enter that email address here.
          ZapierArticle_44

      3. Bcc:

        1. There will not be a data value to select here. If there’s an email address you’d like blind-copied to all the sent abandoned cart emails, enter it here.
          ZapierArticle_45

      4. From:

        1. Click into “From → Choose value...” field.
        2. Select the email address you would like to send your Abandoned Cart emails from.
          zgif2
      5. From Name:

        1. There will not be a data value to select here. Enter the name you wish to display for your customer in the “Enter text or insert data…” field.
          ZapierArticle_47

      6. Reply To:

        1. There will not be a data value to select here. If you have a separate email address used to receive replies your customers, enter that email address. If you are not using a separate email, leave this field blank.
          ZapierArticle_48

      7. Subject:

        1. Enter the subject line you’d like to display. You can mix your own text with data values. In the example below, I enter my own text mixed with the customer name data value we created in Action 3

          1. I first click into the Subject field, then select the customer name data value from Action 3.

          2. Then I finish off the subject line with some text.
        2. zgif3
      8. Body Type:

        1. Select Plain or HTML. 

          1. Plain will display as you’ve typed it. This method is simpler requires no coding ability, just type it up and go.

          2. HTML will allow you to customize your email using inline styling elements. You should be familiar with HTML if selecting this method.

        2. ZapierArticle_50
      9. Body:

        1. Enter the body of your cart abandonment email. You can mix your own text with data values. In the example below,  text is mixed with the customer name data value from Action 3 and the product title data from Action 5.
          zgif4
      10. Signature:

        1. If the email account used to send your cart abandonment emails has a signature, this is the field where you can elect to use the signature in your cart abandonment emails. 
          zap_add_40

      11. Label:

        1. This field allows you to add a label to the replies your customers send.
          ZapierArticle_53

      12. Attachments

        1. Use if you’d like to send your customer an attachment. Like maybe a PDF with a rebate form? In the below example, the Item Image URL data field is used to attach the product images to the email. zgif5

    5. We're ALMOST there! Click the large, blue Continue button. You will see your abandoned cart email populate in a preview field. If the preview looks good to you, click "Test & Review".
      zap_add_41
    6. Log into the email account used for your test order and check out your new cart abandonment email!
      zap_add_42
    7. Like the email? Click the Turn on Zap button!!
      zap_add_43
    8. You did it, Champion. If you need additional support, please reach out to Web Shop Manager and we’ll be happy to help you!
      zap_add_44