Skip to content

Shopify Flow for B2B

Applies toShopify

How it works

A Shopify Flow workflow has a trigger, an optional condition and one or more actions. Many B2B workflows use the b2b tag SparkLayer adds to customers and orders, so they act only on B2B orders. For example, a workflow that tags B2B orders works like this:

Example workflow: tag orders as B2B

Start when

Order created
(this flows forward)

If

Any of the order customer's tags match b2b
(this flows forward)

Then

Add the order tag b2b_order

To use one of our workflows:

  1. Download the .flow file from the tables below.
  2. In Shopify Flow, import the workflow (opens in a new tab).
  3. Check its settings, such as tags or email addresses, and change them to suit your store.
  4. Turn the workflow on and save it.

Order workflows

These workflows handle B2B orders after they're placed.

WorkflowWhat it doesDownload
Mark order as paidMarks an order as paid automatically when a B2B customer orders with a manual payment method.Download (opens in a new tab)
Mark Payment on Account order as paidMarks an order as paid automatically when a B2B customer orders with Payment on Account.Download (opens in a new tab)
Archive B2B ordersArchives B2B orders automatically, to keep them out of your main Shopify orders view alongside retail orders.Download (opens in a new tab)
Tag pre-ordersTags an order when it includes pre-order products.See Stock display
Tag order with the customer's net termsTags each order with the net terms set on the customer (in a metafield).Download (opens in a new tab)
Populate order metafield from custom checkout fieldsCopies data from custom checkout fields (such as a date selector) on the draft order into metafields on the completed order.Download (opens in a new tab)
Control B2B order fulfilmentSends orders from your wholesale customer group to a particular Shopify stock location for fulfilment, so B2B orders are handled separately from retail.Download (opens in a new tab)

Customer workflows

These workflows update a customer's tags as they order and spend.

WorkflowWhat it doesDownload
Switch tag on first orderWhen a B2B customer places their first order, replaces their tag with a new one and sends an internal email.Download (opens in a new tab)
Adjust customer group tag by spendIf you have customer groups such as Gold, Silver and Bronze, updates the customer's tag based on how much they spend, which moves them to a different B2B group.Download (opens in a new tab)

Product workflows

These workflows keep product data and sales channels up to date.

WorkflowWhat it doesDownload
Remove restock date when a variant is back in stockIf you use pre-orders with a restock date, removes the date from the metafield when the product is back in stock.Download (opens in a new tab)
Add new products to the SparkLayer Wholesale and Online Store sales channelsMakes new products available in the SparkLayer Wholesale and Online Store sales channels automatically.Download (opens in a new tab)
Add RRP metafield when product status changesWhen a product's status changes, writes each variant's Shopify price into its RRP field, in US dollars. Change usd in its value to your currency before you turn it on.Download (opens in a new tab)
Update RRP metafield when a product is updatedOnce an hour, copies the Shopify price of each changed variant into its RRP field. Before you turn it on, change its currency and timing: see Show RRPs to your trade customers.Download (opens in a new tab)

Email workflows

These workflows email you, your team or your sales agents.

WorkflowWhat it doesDownload
Send an email with order detailsEmails an address you choose when a B2B customer places an order with a particular B2B payment status. Useful for notifying the team who handle B2B accounts (see the example below).Download (opens in a new tab)
Send notification based on custom checkout fields (draft orders)Triggers an action, such as an internal email, based on custom checkout fields.Download (opens in a new tab)
Send notification based on custom checkout fields (completed orders)Triggers an action, such as an internal email, based on custom checkout fields.Download (opens in a new tab)
Email sales agent when order placed by customerNotifies sales agents when a customer places an order, based on rules you set.Download (opens in a new tab)

Change the email content

You can add order and customer details to a workflow's email with variables. In the Send an email with order details workflow, the Send internal email action has an Email address, a Subject and a Message. For example:

  • Subject: Action required - Draft Order to review
  • Message:
**New Draft Order Created**

**Date:** {{ draftOrder.createdAt }}

**Customer:** {{ draftOrder.customer.displayName }}

**Email:** {{ draftOrder.customer.email }}

**Total:** {{ draftOrder.totalPriceSet.shopMoney.amount }} {{ draftOrder.totalPriceSet.shopMoney.currencyCode }}

**Items Ordered:**
{% for lineItem in draftOrder.lineItems %}
- {{ lineItem.quantity }} × {{ lineItem.title }} – {{ lineItem.originalUnitPriceSet.shopMoney.amount }} {{ lineItem.originalUnitPriceSet.shopMoney.currencyCode }}
{% endfor %}

=====
Please review this customer's order within **Shopify > Orders > Drafts**.

Click Add variable to insert other details.

Was this page helpful?

Last updated