feat(core-flows,order,medusa,types): allow to update the original order.email on order customer transfer requests#14234
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 9 Skipped Deployments
|
🦋 Changeset detectedLatest commit: bc446b1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 77 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
olivermrbl
left a comment
There was a problem hiding this comment.
thought: based on the comments in the code, keeping the original email seemed to have been a very intentional action. I can't remember why, but maybe @fPolic can pitch in
I think we wanted to keep email associated with the order in case purchase was intentionally made with that email and the email needs to be associated with the purchased good. This seems to be an issue when doing transfers between registered accounts (while the original idea behind this feature was to allow claiming an order from unregisterd -> registered account).
|
But I think not the majority of the cases would need this: |
|
Let me know what you think of my last comment guys @fPolic @olivermrbl |
| orderId, | ||
| { | ||
| select: ["id", "version", "items.detail", "summary", "total"], | ||
| select: ["id", "version", "items.detail", "summary", "total", "email"], |
There was a problem hiding this comment.
Q: wondering if it would have any side effect to rely on the orderService_ instead of retrieve (same for retrieveOrderChange) which serialize their result upon returning 🤔
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
This PR was closed because it has been stalled for 5 days with no activity. |
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
This PR was closed because it has been stalled for 5 days with no activity. |
|
Thank you for your contribution! After an initial review, this PR looks good to us. Here's a summary: ✅ Linked to a verified issue Notes: There is an open design discussion from @fPolic in the comments (December 2025) questioning whether updating Additionally, A team member will do a final review before this is merged. We appreciate your patience! |
…n the workflow, to transfer the original order.email conditionally
Summary
What — What changes are introduced in this PR?
Update
order.emailupon customer transfer acceptance.Why — Why are these changes relevant or necessary?
To prevent the order from retaining a link to the old customer email and align it to it's
customerrelation after the transfer is accepted.How — How have these changes been implemented?
When processing the transfer customer action operation set the
order.emailproperty.Testing — How have these changes been tested, or how can the reviewer test the feature?
Integration tests.
Examples
Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.
This helps with documentation and ensures maintainers can quickly understand and verify the change.
// Example usageChecklist
Please ensure the following before requesting a review:
yarn changesetand follow the promptsAdditional Context
Add any additional context, related issues, or references that might help the reviewer understand this PR.
fixes #14161