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:
Start when
If
b2bThen
b2b_orderTo use one of our workflows:
- Download the
.flowfile from the tables below. - In Shopify Flow, import the workflow (opens in a new tab).
- Check its settings, such as tags or email addresses, and change them to suit your store.
- Turn the workflow on and save it.
Order workflows
These workflows handle B2B orders after they're placed.
| Workflow | What it does | Download |
|---|---|---|
| Mark order as paid | Marks 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 paid | Marks an order as paid automatically when a B2B customer orders with Payment on Account. | Download (opens in a new tab) |
| Archive B2B orders | Archives B2B orders automatically, to keep them out of your main Shopify orders view alongside retail orders. | Download (opens in a new tab) |
| Tag pre-orders | Tags an order when it includes pre-order products. | See Stock display |
| Tag order with the customer's net terms | Tags 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 fields | Copies 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 fulfilment | Sends 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.
| Workflow | What it does | Download |
|---|---|---|
| Switch tag on first order | When 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 spend | If 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.
| Workflow | What it does | Download |
|---|---|---|
| Remove restock date when a variant is back in stock | If 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 channels | Makes 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 changes | When 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 updated | Once 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.
| Workflow | What it does | Download |
|---|---|---|
| Send an email with order details | Emails 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 customer | Notifies 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.
Last updated