Show imported or manual orders in My Account
Applies toShopify
My Account only shows orders placed through the SparkLayer checkout. An order created another way, such as a draft order you made in the Shopify admin or a historic order you imported, needs 2 things before it shows: the b2b order tag, and the B2B - Order Import order metafield set to true.
To bring in all your B2B orders placed outside SparkLayer instead of marking them one by one, ask our team to turn on Import B2B orders placed outside SparkLayer. It imports orders for a Shopify company, or from a customer tagged b2b, and also brings in your past B2B orders, newest first.
Before you start
- SparkLayer installed on your store. Set orders up after installing, so they sync.
- Each order belongs to the B2B customer who should see it.
- A list of the orders to show, with their Shopify order numbers.
Show the orders
Add the order import metafield
The order metafield sparklayer.order_import must exist before you can fill it in. In Shopify, go to Settings,Metafields and metaobjects (opens in your Shopify admin in a new tab), click Orders and check for B2B - Order Import. If it isn't there, click Add definition and enter:
| Field | Value |
|---|---|
| Namespace and key | sparklayer.order_import |
| Type | True or false (boolean) |
Tag the orders b2b
For one order, open it in Orders (opens in your Shopify admin in a new tab), add the tag b2b under Tags and save.
For many, tick the orders in Orders (opens in your Shopify admin in a new tab), click Add tags, enter b2b and save.
Set the metafield to true
For one order, open it in Shopify and, in its Metafields card, set B2B - Order Import to true. Click Show all if you can't see it. Save the order.
For many orders, use Matrixify
An import app such as Matrixify (opens in a new tab) sets the metafield on many orders at once. Start from our sample CSV template (opens in a new tab), or put each Shopify order ID in the ID column:
| ID | Metafield: sparklayer.order_import [boolean] | Command |
|---|---|---|
[order-id-here] | TRUE | UPDATE |
Check it worked
- In SparkLayer, the orders show at
SparkLayer Wholesale,Activity (in your Shopify admin). - In My Account, signed in as the customer, the orders show in Recent Activity.
- In Shopify, each order has the
b2btag and B2B - Order Import istrue.
If something's not right
- The order doesn't show. Check it has both the
b2btag and the metafield set totrue. One without the other isn't enough. - You can't find B2B - Order Import on the order. The metafield definition doesn't exist yet. Add it as in step 1, then set the value.
- A draft order you created still doesn't show. My Account only lists completed orders, so a draft order doesn't show, even with the tag and the metafield. Complete it in Shopify first. See Complete a draft order by hand.
- The tag and metafield are set, but the order still doesn't show. Check the metafield's definition in Shopify, under Settings,Metafields and metaobjects (opens in your Shopify admin in a new tab) > Orders. Its namespace and key must be exactly
sparklayer.order_import, and its type True or false. A definition with another namespace, such ascustom, looks the same on the order, but SparkLayer can't read it. Delete it, add it again as in step 1, then set the value totrueagain. - Only one of several split orders shows. If you split an order into several orders, each one keeps the original's
sparkCartIdunder Additional details. My Account shows only one order for eachsparkCartId, so remove it from all but one of the orders.
Next steps
Last updated