Skip to content

[Shopify] Check fulfillment service exists before querying assigned fulfillment orders#6904

Merged
onbuyuka merged 1 commit intomainfrom
bugs/623365-ShpfyFullSvc
Mar 2, 2026
Merged

[Shopify] Check fulfillment service exists before querying assigned fulfillment orders#6904
onbuyuka merged 1 commit intomainfrom
bugs/623365-ShpfyFullSvc

Conversation

@onbuyuka
Copy link
Contributor

@onbuyuka onbuyuka commented Feb 27, 2026

When syncing shipments to Shopify, the assignedFulfillmentOrders GraphQL call fails with "The api_client is not associated with any fulfillment service" if the fulfillment service was disassociated on Shopify's side (e.g., app reinstall, store migration).

Changes

  • New GraphQL query (HasFulfillmentService): Queries Shopify locations by name to verify the fulfillment service location exists before calling assignedFulfillmentOrders.
  • GetAssignedFulfillmentOrders: After the existing Fulfillment Service Activated flag check, queries Shopify to confirm the service actually exists. If not, resets the flag to false and exits gracefully.
  • ShpfySyncShipmToShopify: Tracks queried shop codes separately to avoid redundant API calls when a shop has no assigned fulfillment orders.

Fixes AB#623365

@onbuyuka onbuyuka requested a review from a team as a code owner February 27, 2026 15:06
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Feb 27, 2026
@onbuyuka onbuyuka changed the title Fix: Check fulfillment service exists before querying assigned fulfillment orders []Check fulfillment service exists before querying assigned fulfillment orders Feb 27, 2026
@onbuyuka onbuyuka changed the title []Check fulfillment service exists before querying assigned fulfillment orders [Shopify] Check fulfillment service exists before querying assigned fulfillment orders Feb 27, 2026
@github-actions github-actions bot added this to the Version 29.0 milestone Feb 27, 2026
@onbuyuka onbuyuka enabled auto-merge (squash) February 27, 2026 15:57
@onbuyuka onbuyuka merged commit 3c83280 into main Mar 2, 2026
45 checks passed
@onbuyuka onbuyuka deleted the bugs/623365-ShpfyFullSvc branch March 2, 2026 17:36
onbuyuka added a commit that referenced this pull request Mar 3, 2026
…ulfillment orders (#6904)

When syncing shipments to Shopify, the `assignedFulfillmentOrders`
GraphQL call fails with "The api_client is not associated with any
fulfillment service" if the fulfillment service was disassociated on
Shopify's side (e.g., app reinstall, store migration).

## Changes

- **New GraphQL query** (`HasFulfillmentService`): Queries Shopify
locations by name to verify the fulfillment service location exists
before calling `assignedFulfillmentOrders`.
- **`GetAssignedFulfillmentOrders`**: After the existing `Fulfillment
Service Activated` flag check, queries Shopify to confirm the service
actually exists. If not, resets the flag to `false` and exits
gracefully.
- **`ShpfySyncShipmToShopify`**: Tracks queried shop codes separately to
avoid redundant API calls when a shop has no assigned fulfillment
orders.

Fixes
[AB#623365](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/623365)
onbuyuka added a commit that referenced this pull request Mar 4, 2026
## Summary
- Check that a fulfillment service exists before querying assigned
fulfillment orders
- Handle deleted fulfillment service locations in Shopify sync

Fixes
[AB#623993](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/623993)

Cherry-picked from main:
- 3c83280 [Shopify] Check fulfillment service exists before querying
assigned fulfillment orders (#6904)
- 1819203 [Shopify] Handle deleted fulfillment service location in
Shopify (#6847)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants