Skip to content

Commit 5058bd9

Browse files
author
Sim Pi Agent
committed
Pi Babysit: address PR #9940 feedback
1 parent fce4c77 commit 5058bd9

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • apps/sim/content/library/how-to-build-shopify-ai-agent-orders-inventory

‎apps/sim/content/library/how-to-build-shopify-ai-agent-orders-inventory/index.mdx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date: 2026-11-12
77
updated: 2026-11-12
88
authors:
99
- andrew
10-
readingTime: 9
10+
readingTime: 10
1111
tags: [AI Agents, Ecommerce, Shopify, Automation, Sim]
1212
ogImage: /library/how-to-build-shopify-ai-agent-orders-inventory/cover.jpg
1313
draft: false
@@ -112,7 +112,9 @@ A small store may check once or twice per day, while a high-volume operation may
112112

113113
Use Sim's native Shopify inventory-reading operation and preserve Shopify's inventory item and location identifiers throughout the workflow. Shopify models an [inventory level as an item at a specific location](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventorylevel), so location-level evaluation avoids hiding a fulfillment shortage behind stock held elsewhere.
114114

115-
Configure the Shopify step to return the inventory records needed for the monitored catalog. Normalize each record into fields such as:
115+
Configure Shopify List Inventory Items to return the inventory records needed for the monitored catalog. The operation returns 50 inventory items by default, so repeat it with `pageInfo.endCursor` in the `after` field while `pageInfo.hasNextPage` is true. Each inventory item includes up to 10 locations; when `inventoryLevelsPageInfo.hasNextPage` is true, use Shopify Get Inventory Level with the inventory item ID, repeat it with its `pageInfo.endCursor` in `after`, and evaluate every returned location record.
116+
117+
Normalize each record into fields such as:
116118

117119
- Product title
118120
- Variant title
@@ -157,15 +159,15 @@ Build a Shopify order status agent by accepting an order identifier, retrieving
157159

158160
### How should the Shopify order status agent receive a request?
159161

160-
Receive an exact order ID or order number together with the minimum customer information needed to validate the request.
162+
Receive an exact Shopify order ID or order number together with the minimum customer information needed to validate the request. Shopify Get Order requires a GraphQL ID such as `gid://shopify/Order/123456789`, so an order number such as `#1001` must first be resolved with Shopify List Orders and its returned order ID passed to Shopify Get Order.
161163

162164
The request can originate from an internal form, a support workflow, Chat, or another authenticated system. Do not let a customer retrieve an order by supplying only a common name or email address. Require an appropriate identity check before exposing order details.
163165

164166
### How should Sim look up the Shopify order?
165167

166168
Use Sim's Shopify order lookup operation and treat Shopify as the source of truth for payment, fulfillment, cancellation, and shipment fields. Shopify's [order query retrieves an order by ID and exposes financial and fulfillment information](https://shopify.dev/docs/api/admin-graphql/latest/queries/order).
167169

168-
Pass the exact order identifier into the Shopify step. If no matching order is found, route the run to a support queue instead of asking the model to infer an order or fabricate a status.
170+
Pass the exact Shopify GraphQL order ID into Shopify Get Order. If the request supplies an order number, query Shopify List Orders for that number, verify the match, and pass the returned `id` into Shopify Get Order. If no matching order is found, route the run to a support queue instead of asking the model to infer an order or fabricate a status.
169171

170172
### How should Sim draft the customer update?
171173

0 commit comments

Comments
 (0)