WooCommerce Integration

WooCommerce is an open-source e-commerce plugin for WordPress. It is designed for small- to large-sized online merchants using WordPress. By integrating WooCommerce with DailyStory, you can leverage the DailyStory marketing automation platform to seamlessly send emails, text messages, push notifications and more.

How to integrate WooCommerce and DailyStory

Follow the steps below to integrate WooCommerce and DailyStory.

Obtain your WooCommerce API keys

Login to your WooCommerce account and see the WooCommerce documentation to generate the Consumer Key and Consumer Secret from your WooCommerce site.

Enable integration in DailyStory

  1. Navigate to your User Account Settings > Integrations.
  1. Scroll down to find WooCommerce, click on the gear icon, and select Configure.
  1. Enter the Site URL, Consumer Key, and Consumer Secret obtained in Step 1, and click the Save button.

SMS Opt-Out for New Customers

The WooCommerce integration supports an option that new customers synced from WooCommerce come into DailyStory as opted-out by default. This option requires the recipients are opted in separately.

Congratulations. WooCommerce integration is now successfully configured! Data will begin importing into DailyStory from WooCommerce.

WooCommerce Sync

Once WooCommerce integration is enabled, DailyStory:

Fields synced from WooCommerce

When WooCommerce integration is enabled, DailyStory automatically syncs data from WooCommerce.

Recommended

WooCommerce sync is one-directional. And data from WooCommerce will always be considered the "source of truth."

Standard fields

DailyStory will sync the following standard fields from WooCommerce:

DailyStory also will automatically geocode (calculate the latitude and longitude) the contact record.

WooCommerce order fields at a glance

Every field the WooCommerce integration creates on a contact record, in addition to the standard fields listed above.

FieldWhat it holds
IdThe WooCommerce customer id
Date CreatedWhen the customer registered in WooCommerce
Date UpdatedWhen the customer record last changed
StatusThe most recent order status, including custom statuses added by plugins
Date Last OrderWhen the most recent order was completed
Last Order IdThe WooCommerce id of the most recent order
Last Order NumberThe order number as shown to the customer
Last Order ValueThe total of the most recent order
Order CountHow many completed orders this customer has placed
Total SpentLifetime spend across all completed orders
CurrencyThe currency of the most recent order
Purchased ProductsThe products this customer has bought
Products CategoriesThe categories those products belong to
Coupon CodesCoupon codes used on the most recent order
Abandoned Checkout DateWhen a checkout was started and not paid for
Abandoned Checkout UrlA link that returns the shopper to their unpaid order
Abandoned Checkout Order IdThe WooCommerce id of the unpaid order, used by the Woo Products email widget to show the shopper's cart
Purchase HistoryA structured record of every item purchased, with price and date

Order status and automations

DailyStory tracks the status of every WooCommerce order. When an order reaches one of the statuses below, it starts the matching automation trigger. Each trigger starts once per order. Triggers only start for orders that changed in the last two days, so a store's first sync does not send customers messages about old orders.

WooCommerce order statusAutomation trigger
pendingWhen cart abandoned
failedWhen payment is declined
processing or on-holdWhen cart is purchased
completedWhen order is shipped (and When cart is purchased, if the order hasn't already started it)

With the DailyStory WordPress plugin installed and your account connected, your store's server also sends checkouts and orders to DailyStory the moment they happen, so these triggers start right away instead of on the next sync. When cart abandoned also starts as soon as a shopper begins checkout, before any order exists. The plugin and the sync share the same record of which triggers each order has started, so a trigger never starts twice for the same order. Cancelled and refunded orders are sent as the custom events woocommerce_order_cancelled and woocommerce_order_refunded.

To build an automation on one of these triggers, see the Abandoned Cart Campaign guide.

Abandoned checkout is not the same as an abandoned cart

In WooCommerce, the pending status means a shopper reached checkout and did not complete payment. That is an abandoned checkout. A shopper who leaves before an order is created never creates an order in WooCommerce at all, so there is nothing for the sync to see. To reach those shoppers, connect the DailyStory WordPress plugin: When cart abandoned then starts as soon as a shopper begins checkout, including guests who have only typed their email.

Custom order statuses

Many WooCommerce extensions add their own order statuses, such as partially-shipped or the statuses used by WooCommerce Subscriptions. DailyStory syncs these exactly as your store reports them, so you can build segments on any status your store uses. The triggers listed above fire for the core statuses shown.

Sales and revenue

When an order reaches completed, DailyStory records a sale for each item in that order against the customer's contact record. The amount recorded is the line total the customer actually paid, after any coupon discounts have been applied.

Store activity tracking

The WooCommerce integration syncs customers and orders from your store. To also receive checkouts and orders the moment they happen, and capture what shoppers do on the storefront itself, install the DailyStory WordPress plugin and connect your account. With the plugin in place, DailyStory additionally receives:

See WordPress Integration for details, including how to turn store tracking off.

Recovering an abandoned checkout

When a checkout is abandoned, DailyStory records the date on Abandoned Checkout Date, a link back to the unpaid order on Abandoned Checkout Url, and the order itself on Abandoned Checkout Order Id. Use the link in your recovery email or text message so the shopper returns straight to payment:

Finish your checkout: {{profile.woo_checkout_abandoned_url}}

All three fields are cleared as soon as the order moves on from pending, so a recovery automation stops targeting a customer who has since paid. To show the products in that order, add the Woo Products email widget to your recovery email.

With the DailyStory WordPress plugin connected, you don't have to wait for an unpaid order. The shopper's cart is sent as soon as they start checkout, and the Woo Products widget's Complete your order button is a recovery link that rebuilds the cart in any browser and opens checkout. Recovery links last 30 days.

Woo Products email widget

When the WooCommerce integration is enabled, the email designer adds a Woo Products widget to the widget menu. Drag it onto the design canvas to show products from your store in any email. Product names, prices and images are read from WooCommerce when the email is sent, so every recipient sees current pricing and stock.

Choose which products to show

Products optionWhat the widget shows
Selected productsThe products you choose. Search your store by product name; products appear in the order you select them.
Products from categoriesUp to 12 published, in-stock products from one or more categories, ordered by newest, best selling, top rated, or price.
This contact's abandoned checkoutThe recipient's abandoned cart, with quantities, the total, and a button back to checkout. With the DailyStory WordPress plugin this is the cart the shopper left at checkout, even if no order was created; otherwise it is the order the recipient started at checkout and did not pay for.

Layout and style

Show shoppers their abandoned checkout

  1. Create an automation that starts with the When cart abandoned trigger.
  2. Add a wait step, such as one hour, to give the shopper time to finish on their own.
  3. Send an email that contains the Woo Products widget, with Products set to This contact's abandoned checkout.
  4. Set the automation's exit goal to When a cart is purchased, so customers who complete their order leave the automation.

Each recipient sees their own cart. With the DailyStory WordPress plugin connected, the widget shows the cart the shopper left at checkout (products, images, quantities and prices, formatted the way your store shows them), even when they left before an order was created. Its Complete your order button is a recovery link that rebuilds the cart in any browser and opens checkout, so it works when the shopper opens the email on another device. Recovery links last 30 days.

Without the plugin's cart, the widget shows the recipient's unpaid order from the sync. Recipients without an unpaid order, or whose order has been paid or cancelled by the time the email is sent, do not see the widget at all. In the designer, the preview shows your store's most recent order as a sample.

Always current, never blocking

Store data is read at send time and briefly cached. If your store cannot be reached when an email is sent, the widget uses the most recent products it was able to read, or is left out, and the email is still delivered.

Refunds and cancellations

If an order is later refunded or cancelled, the sales recorded for it are removed, and the customer's Order Count and Total Spent fall back accordingly. Both figures are recalculated from the recorded sales on every sync rather than added up as orders arrive, so they stay correct even when the same order is synced more than once.

Purchase history

Purchase History is a structured record of everything a customer has bought, rather than a flat list of product names. Each purchase carries three values: Item, Price and Purchase Date.

Because each purchase is its own record, a segment can ask questions the flat product list cannot, such as "bought a particular item between two dates for more than a given amount". Purchase history is built from the sales already recorded for your store, so a store with existing order history sees it appear without needing a re-import.

Auto-created segments

When the WooCommerce integration is enabled, the following dynamic segments are created automatically. They are provided as starting points and can be used, edited or deleted:

  1. Customers that haven't ordered in past 60 days - previous purchasers who have gone quiet.
  2. New WooCommerce customers in past 30 days - customers who placed their first order in the last month.
  3. Abandoned cart today - customers who abandoned a checkout today.
  4. Customers that have ordered more than once - repeat purchasers.
  5. Customers that have spent more than $100 - your higher-value customers.

Conversion tracking

A WooCommerce conversion funnel is created when the integration is enabled. With the DailyStory WordPress plugin installed, completed orders are recorded as a conversion with their value and the buyer's email and phone, so store revenue, including guest purchases, can be attributed to the campaigns and automations that produced it.