Skip to content

fix: capture Shopify fulfillment deliveredAt timestamp - #11604

Draft
Albion Bame (abame) wants to merge 1 commit into
microsoft:mainfrom
abame:fix/shpfy-fulfillment-delivered-at
Draft

Albion Bame (abame) wants to merge 1 commit into
microsoft:mainfrom
abame:fix/shpfy-fulfillment-delivered-at

Conversation

@abame

@abame Albion Bame (abame) commented Sep 18, 2026

Copy link
Copy Markdown

What & why

The Shopify connector didn't capture a fulfillment's deliveredAt timestamp from Shopify. The GraphQL query never requested it, the Shpfy Order Fulfillment table (30111) had no field for it, and the import logic didn't parse it, even though createdAt/updatedAt were already handled the same way. This adds a deliveredAt field, requests and parses deliveredAt on import, and surfaces it on the Order Fulfillment pages, so users can see when a shipment was actually delivered.

ShpfyExportShipments.Codeunit.al already requested deliveredAt in its fulfillmentCreate mutation response but discarded it, since that response is passed into the same shared ImportFulfillment procedure. Fixing the parsing there covers both the order-fetch flow and the shipment-export flow with one change.

Linked work

Fixes #10362

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

  • Extended ShpfyOrderFulfillmentsTest.Codeunit.al (UnitTestImportFulfillment) to assert Delivered At stays blank when Shopify's deliveredAt is null.
  • Added UnitTestImportFulfillmentSetsDeliveredAt: a fulfillment with a real deliveredAt value is parsed correctly into Delivered At.
  • Added UnitTestImportFulfillmentUpdatesDeliveredAtOnReimport: a fulfillment first imported with no deliveredAt, then re-imported once Shopify has set it (the scenario raised in issue discussion), confirms the existing record gets updated.

Risk & compatibility

Additive change only: new table field (DataClassification = SystemMetadata), new query field, new page fields. No breaking changes, no upgrade/data migration needed, no permission changes.

Follow-up (not included in this PR, discussed in issue): there's currently no webhook that detects when Shopify updates deliveredAt on an already-imported fulfillment (only orders/create and bulk_operations/finish are subscribed). An existing fulfillment only gets refreshed via a full order re-sync (manual, scheduled, or bulk-operations webhook). A fulfillments/update webhook subscription would close that gap but is scoped as separate future work per discussion with AndreiPanko.

@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Team: Integrations GitHub request for Integrations area labels Sep 18, 2026
@abame

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions github-actions Bot added the needs-approval Workflow runs require maintainer approval to start label Sep 18, 2026
@abame

Copy link
Copy Markdown
Author

Fixes #10362

@github-actions github-actions Bot added needs-approval Workflow runs require maintainer approval to start and removed needs-approval Workflow runs require maintainer approval to start labels Sep 18, 2026
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 From Fork Pull request is coming from a fork needs-approval Workflow runs require maintainer approval to start Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Shopify Connector – Fulfillment "Delivered At" timestamp is not imported

1 participant