Create NetSuite sales orders from paid Shopify orders

When a Shopify order is paid, we match or create the buyer in NetSuite, build the sales order line by line, and post a Slack recap to your orders channel.

Deterministic Code
NetSuiteShopifySlackOperationsFinanceData SyncNotifications & Alerts
PromptCreate

When Shopify sends a webhook telling us an order has been paid, I want the matching sales order created in NetSuite automatically. Take the order id from the webhook payload and use the Shopify Get Order operation to fetch the full order: customer name and email, the Shopify customer id, the order number, every line item with its SKU, quantity and unit price, plus line discounts, shipping cost, tax, and the order total. If the order is not actually paid, stop and do nothing.

Next resolve the buyer in NetSuite. Run a SuiteQL query against the customer table filtering on the buyer's email address. If a customer comes back, use it. If none exists, create one with the NetSuite upsert by external id operation on the customer record type, keyed to the Shopify customer id (for example shopify-customer-8123456789), and fill in name, email, and the billing address from the Shopify order. Keying on the Shopify customer id means repeat buyers and replayed webhooks land on the same NetSuite customer instead of spawning duplicates.

Before writing the order, map every Shopify line item SKU to a NetSuite item. Run a SuiteQL query against the item table matching the SKU to the NetSuite item id and collect the internal id for each line. If any SKU has no matching NetSuite item, do not silently drop that line and do not create a partial sales order. Fail the whole order instead: post a Slack message to our orders channel with the Send a Message operation, naming the Shopify order number and every unmatched SKU so someone can fix the item mapping and run the order through again, then stop the workflow.

When every SKU resolves, create the sales order in NetSuite using the upsert by external id operation on the salesOrder record type, with the external id set to the Shopify order number (for example shopify-order-1043). Set the customer to the NetSuite customer resolved above and add one line per Shopify line item carrying the mapped NetSuite item, the quantity, the unit price, and any line level discount. Carry shipping cost and tax onto the order as well. NetSuite money and quantity fields are plain decimals in the record currency, so pass the Shopify amounts straight through with no cents conversion. Because the sales order is keyed on the Shopify order number, a duplicate or replayed webhook updates the existing sales order rather than creating a second one.

Then notify the team in Slack, in our orders channel. For a normal order, post a short confirmation with the NetSuite sales order number, the customer name, and the order total. When the order total is over $5,000, post a louder alert in the same channel instead: an at-here mention, a bold headline calling out the high value order, and the same details plus the number of lines, so the account team sees it right away.

If NetSuite rejects a write for any other reason, such as a validation failure, a missing permission, or concurrency throttling, post that failure to the same Slack channel naming the Shopify order number and the error, so no paid order ever fails silently on its way into NetSuite.

What does this prompt do?

  • Watches for paid orders in your Shopify store and creates the matching sales order in NetSuite within seconds, with no manual re-keying
  • Finds the buyer in NetSuite by email and creates the customer record if they are new, so repeat buyers stay one record instead of a pile of duplicates
  • Copies every line across with quantity, price, discounts, shipping and tax, and stamps the Shopify order number onto the NetSuite order
  • Posts a Slack confirmation to your orders channel for every order, plus a louder alert when an order is worth more than $5,000
  • Refuses to create a half-complete order: if a product code has no match in NetSuite, it names the missing code in Slack so someone can fix the mapping

What do I need to use this?

  • A Shopify store you can connect, with access to orders and customers
  • A NetSuite account with permission to create customers and sales orders
  • A Slack workspace and the channel where your orders team already works
  • Product codes (SKUs) in Shopify that match your item codes in NetSuite

How can I customize it?

  • Change the $5,000 alert threshold to whatever counts as a big order for your business
  • Send confirmations and high value alerts to different Slack channels, or route the failure messages to whoever owns your item catalog
  • Adjust which order details carry across, for example adding shipping method, sales rep, or a specific NetSuite subsidiary and location

FAQs

Will this create duplicate customers in NetSuite for repeat buyers?
No. Every buyer is matched on their email address first, and any new customer is tagged with their Shopify customer id, so the same shopper always lands on the same NetSuite record no matter how many times they order.
What happens if Shopify sends the same order twice?
The NetSuite sales order carries the Shopify order number as its own reference, so a repeat delivery updates the order that already exists instead of creating a second one. Replays are safe.
What if a product in the order does not exist in NetSuite?
The sales order is not created at all. You get a Slack message naming the exact product code with no match, so you can add the item in NetSuite and put the order through again. Nothing is quietly dropped from an order.
Does this run for every order, or only paid ones?
Only paid orders. Pending payments and abandoned checkouts are ignored, so your NetSuite order book stays clean.
Do I need a developer to set this up?
No. Connect Shopify, NetSuite and Slack, choose your orders channel, and check that your product codes line up between the two systems.

Related templates

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Turn each week's football fixtures into a venue staffing plan

Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.

API-Sports
Google Calendar
Slack
Agentic Task
Auto-correct address typos and hold the orders you can't fix

Every weekday morning, harmless address typos get fixed on unshipped orders, and anything undeliverable is held while the customer confirms it.

Shippo
Shopify
Gmail
+1
Agentic Task
Turn 5 star Yotpo reviews into a weekly marketing content queue

Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.

Yotpo
Notion
Slack
Agentic Task

Stop re-keying Shopify orders into NetSuite.

Every paid order lands in NetSuite as a proper sales order, with the customer matched, the lines mapped, and your team notified in Slack.