The short answer
Many large retailers and distributors trade purchase orders, shipping notices and invoices with their suppliers through EDI, which stands for electronic data interchange. Because Shopify runs on APIs and webhooks instead of EDI documents, a translator has to sit in the middle. That can be an EDI provider, an ERP system that includes EDI, or an integration you build yourself.
The central choice for a Plus brand is the point at which EDI plugs in. Often the right home is the ERP system, while Shopify shares that same stock. If wholesale orders are managed in Shopify, however, a direct connection there is sensible.
Which EDI documents matter?
X12 is the standard commonly used by trading partners in the United States, and it assigns every document a number. A brand that sells to retailers will run into these most frequently:
| Document | Code | Direction | What it does |
|---|---|---|---|
| Purchase order | 850 | Retailer to you | Submits the order |
| Purchase order acknowledgment | 855 | You to retailer | Confirms, modifies or declines lines |
| Purchase order change | 860 | Retailer to you | Revises an order that was already sent |
| Advance ship notice | 856 | You to retailer | Tells the retailer, ahead of arrival, what each carton holds |
| Invoice | 810 | You to retailer | Asks for payment |
| Inventory advice | 846 | You to retailer | Shares available stock |
| Functional acknowledgment | 997 | Both ways | Verifies that a document arrived and was readable |
Partners elsewhere in the world often work with the EDIFACT standard, where the same steps go by different names. On top of that, each retailer issues a guide of its own listing the fields it requires. Your mapping must comply with that guide rather than with the standard.
Where should EDI connect?
| Setup | Fits when | Watch out for |
|---|---|---|
| EDI into the ERP system | Stock, prices and invoicing are owned by the ERP | Stock sold to retailers has to show up in Shopify quickly |
| EDI into Shopify | Shopify is where wholesale orders are managed | Documents requiring data that Shopify doesn’t store |
| EDI into a warehouse system | Retail orders are shipped by a fulfillment partner | Orders and invoices that still need to live somewhere else |
| Web portal of the retailer | Monthly order counts are low | Typing by hand, where mistakes rise along with volume |
Let the data guide you. Documents containing carton contents, invoice numbers and agreed prices should be created by whichever system knows those details. Should that be the ERP, routing retail orders via Shopify beforehand only introduces an extra step, plus another spot where things can break.
How does a purchase order map to Shopify?
If retail orders actually end up in Shopify, every element of the document must have a fixed destination. Settle the following table before any code gets written:
| In the purchase order | In Shopify | Decide beforehand |
|---|---|---|
| Buying organization | Company | Whether each retailer or each banner gets one company |
| Ship-to store or distribution center | Company location | Who adds a location when it is missing |
| Retailer’s item number or UPC | Variant, matched by SKU or barcode | How to handle an item that nobody can match |
| Agreed cost | Catalog price | Which side prevails if the prices don’t agree |
| Payment terms | Payment terms on the order | Whether payment is tracked by the ERP or by Shopify |
| Purchase order number | PO number on the order | Leave it untouched, because the invoice repeats it |
| Ship window | Order attribute or metafield | How it becomes visible to the warehouse |
| Units per carton | Metafield on the variant | Who keeps it up to date |
Two cases deserve an answer before all others: items nobody recognizes and prices that deviate. When an order goes through automatically at the wrong price, it becomes a dispute over the invoice. Have a person look at such orders before releasing them.
To learn about the B2B structures underlying companies, locations and catalogs, read about how to choose a B2B ecommerce platform.
Why is the ship notice the hardest part?
What was ordered is stated in the purchase order. The advance ship notice, by contrast, records what physically got packed, one carton after another, and every carton carries a label matching the notice. Only the warehouse has this information.
In Shopify, a fulfillment captures the shipped items along with the tracking number. Carton-level contents, in the form a retailer’s guide demands, are not part of it. The packing process must therefore supply the notice, which means warehouse staff have to scan items into cartons instead of working from a list.
Timing is another factor, since the notice is expected ahead of the goods. Depending on the agreement, deductions from the payment may follow if it is late or inaccurate. Go through that section of the retailer’s guide together with the warehouse team, in the same room.
How do you protect stock for both channels?
Orders from retailers are big and come in waves, whereas those from consumers are small and never stop. Unless you keep them apart, the two pull from the same goods.
- Set retail stock aside. Keep it in a separate location or mark it as unavailable, so that no campaign is able to sell it.
- Define when stock is released. Determine the moment at which reserved goods go back to the store should a retailer order less than planned.
- Give a safe number. Before sending inventory advice, deduct a buffer. That number is what a retailer plans with.
- Reconcile every day. Check the ERP, the warehouse and Shopify against one another, then pass any differences to a person.
For how Shopify counts stock by location and state, see the article on managing inventory in Shopify.
Provider, ERP module or custom build?
- EDI provider. Connections and retailer guides are maintained by the provider, and you map to it just once. Find out which of your retailers it already serves and in what way it reports failures.
- ERP module. Orders, stock and invoices stay together in one place. Clarify who adjusts a mapping after a retailer revises its guide.
- Custom build. The translator itself is the lesser share of the work; staying current with every partner’s changes and tests is the greater one. Many choose a middle path, in which a provider covers the EDI side while a custom integration links that provider to Shopify or the ERP.
No matter which option you go for, Shopify caps the number of requests an integration is allowed to make, and it may deliver a webhook more than once. Plan for both from the outset: handle large batches in bulk, and ensure that one purchase order can never produce two orders.
What should you test before go-live?
Certification is usually run by the retailers themselves. Since it only covers the normal case, the tests you run should reach beyond it.
- An order containing an item your catalog doesn’t have
- A price that doesn’t match the agreement
- A change received once picking is already underway
- A partial shipment spread over several cartons
- A line that is canceled, and an order that is canceled
- One purchase order sent twice
- A document for which no acknowledgment comes back
- A shortage of stock discovered while packing
Note for each of these cases which system detects it, who gets informed and what is sent to the retailer.
Questions to settle before you start
- Which retailers insist on EDI, and what documents does each of them require?
- Stock, prices and invoices: which system owns them?
- Is the warehouse able to pack by carton and print the labels that are required?
- Who checks the error queue every morning?
- When a retailer revises its guide, who updates the mapping?
- In revenue reports, how will retail orders show up alongside store orders?
Begin with the third question if it is still unanswered. When a warehouse process fails to record what was put into each box, no software can generate a correct ship notice from it.
Next step
elbDev works as a tech partner for Shopify Plus brands. Its free potential check looks at your store, the surrounding systems and the way orders and stock travel between them. You can book it on the home page of elbDev.
