---
title: "Retailer purchase order to a ShipBob B2B order, stock checked first | FlowRunner flow"
description: "When a client forwards a retailer PO, checks every line against stock ShipBob can ship and creates the B2B order with the retailer's terms. Short lines go to the account manager."
url: https://flowrunner.ai/flows/shipbob-retailer-po-to-b2b-order
date_published: 2026-11-19
date_modified: 2026-11-25T18:03:54-08:00
---

# Retailer purchase order to a ShipBob B2B order, stock checked first

When a client forwards a retailer PO, checks every line against stock ShipBob can ship and creates the B2B order with the retailer's terms. Short lines go to the account manager.

## The prompt

When a client emails a retailer's purchase order to our orders inbox in Gmail, read the PO and pull out the retailer, PO number, ship-to, ship window, cancel date, parcel or freight, freight terms, department, mark-for store, routing notes and every line with the vendor SKU and quantity. Check each SKU's fulfillable stock in ShipBob, not counting units already committed to other orders. If every line can ship, the freight terms are clear and the cancel date hasn't passed, create a B2B order in ShipBob with the PO number, the ship window's start as the ship-after date, the carrier type, freight terms, department and mark-for store, and reply to the client with the ShipBob order number. Otherwise ask our account manager in Slack, with Ship what is available and Hold the order buttons, and wait for the answer. If they say ship, create the order with the units available and tell the client which lines are not shipping. Tell the account manager in Slack if ShipBob refuses the order.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

## The flow

Inside the loop: Each line on the PO

[Import this flow](https://flowrunner.ai/downloads/prompt-to-flow/shipbob-retailer-po-to-b2b-order.json)

-   [ShipBob](https://flowrunner.ai/integrations/shipbob)
-   [Gmail](https://flowrunner.ai/integrations/gmail-service)
-   [Slack](https://flowrunner.ai/integrations/slack)

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. [How importing works](https://docs.flowrunner.ai/manage/flows#importing-a-flow)

## What each step does

1.  New retailer PO email Checks the orders inbox in Gmail every 5 minutes for an email with an attachment and purchase order or PO in the subject, leaving ASNs and packing lists alone.
2.  Read the purchase order Once the file is saved, an AI agent pulls out the retailer, PO number, ship-to, ship window, cancel date, parcel or freight, freight terms, department, mark-for store, routing notes and each line's vendor SKU and quantity.
3.  Check stock in ShipBob Reads each SKU's inventory levels in ShipBob and notes the fulfillable units, so stock already committed to other orders does not count.
4.  Build the B2B order Sets each line to the units that can ship and the ship-after date to the start of the ship window. Flags short lines, SKUs not in ShipBob, missing freight terms, a cancel date that has passed and an incomplete ship-to.
5.  Create the B2B order in ShipBob A PO that can ship complete becomes a B2B order with the retailer's PO number, ship-after date, parcel or freight, freight terms, department and mark-for store, and the client gets a reply in the same thread with the ShipBob order number. A repeated PO number, or anything else ShipBob refuses, goes to Slack with the reason.
6.  Ask the account manager Anything else goes to Slack with the ship-to, dates, freight terms, routing notes and every short or unknown line, showing on hand and committed units, with two buttons, Ship what is available and Hold the order.
7.  Wait for the account manager's answer The run waits for the click. Ship what is available creates the order with the units that can ship, and the reply lists the lines not shipping. Hold the order creates nothing and says so in the Slack thread.

## Need a custom retail purchase orders automation? Our team can build it for you.

Tell us the process. Our implementation team at Midnight Flow builds it around how you work, tests it on your real data, and keeps it running, in your own FlowRunner workspace.

[Have us build it](https://midnightflow.ai/packages/custom?utm_source=flowrunner.ai&utm_medium=referral&utm_campaign=general&utm_content=flows.aside&utm_term=shipbob-retailer-po-to-b2b-order)

## Before you turn it on

-   Connect your Gmail, ShipBob and Slack accounts.
-   Add your Anthropic key in the flow setting Anthropic key, and set B2B ship option to the ShipBob ship option your retail orders use.
-   Copy the URL of the block Wait for the account manager's answer into the flow setting Answer link. The Slack buttons open it.
-   Create the B2B order in ShipBob sends ShipBob's standard B2B program, SB-B2B. If ShipBob has enrolled you in a retailer's own program, put its code in Retailer Program Type.
-   Pick your Slack channel in the three Slack steps, and narrow the Gmail search to your orders inbox if it shares a mailbox.

[Everything FlowRunner does with ShipBob](https://flowrunner.ai/integrations/shipbob)

---
Markdown version of https://flowrunner.ai/flows/shipbob-retailer-po-to-b2b-order. Site index: https://flowrunner.ai/llms.txt
