fix: capture Shopify fulfillment deliveredAt timestamp - #11604
Draft
Albion Bame (abame) wants to merge 1 commit into
Draft
Albion Bame (abame) wants to merge 1 commit into
Albion Bame (abame) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
Author
|
Fixes #10362 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The Shopify connector didn't capture a fulfillment's
deliveredAttimestamp from Shopify. The GraphQL query never requested it, theShpfy Order Fulfillmenttable (30111) had no field for it, and the import logic didn't parse it, even thoughcreatedAt/updatedAtwere already handled the same way. This adds adeliveredAtfield, requests and parsesdeliveredAton import, and surfaces it on the Order Fulfillment pages, so users can see when a shipment was actually delivered.ShpfyExportShipments.Codeunit.alalready requesteddeliveredAtin itsfulfillmentCreatemutation response but discarded it, since that response is passed into the same sharedImportFulfillmentprocedure. 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
What I tested and the outcome
ShpfyOrderFulfillmentsTest.Codeunit.al(UnitTestImportFulfillment) to assertDelivered Atstays blank when Shopify'sdeliveredAtis null.UnitTestImportFulfillmentSetsDeliveredAt: a fulfillment with a realdeliveredAtvalue is parsed correctly intoDelivered At.UnitTestImportFulfillmentUpdatesDeliveredAtOnReimport: a fulfillment first imported with nodeliveredAt, 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
deliveredAton an already-imported fulfillment (onlyorders/createandbulk_operations/finishare subscribed). An existing fulfillment only gets refreshed via a full order re-sync (manual, scheduled, or bulk-operations webhook). Afulfillments/updatewebhook subscription would close that gap but is scoped as separate future work per discussion with AndreiPanko.