chore: improve description of findOrCreateCustomerStep (#12840)

This commit is contained in:
Shahed Nasser
2025-06-26 19:02:52 +03:00
committed by GitHub
parent 2005188192
commit bf1ed331be
@@ -38,9 +38,14 @@ interface StepCompensateInput {
export const findOrCreateCustomerStepId = "find-or-create-customer" export const findOrCreateCustomerStepId = "find-or-create-customer"
/** /**
* This step either finds a customer matching the specified ID, or finds / create a customer * This step finds or creates a customer based on the provided ID or email. It prioritizes finding the customer by ID, then by email.
* matching the specified email. If both ID and email are provided, ID takes precedence. *
* If the customer is a guest, the email is updated to the provided email. * The step creates a new customer either if:
*
* - No customer is found with the provided ID and email;
* - Or if it found the customer by ID but their email does not match the email in the input.
*
* The step returns the details of the customer found or created, along with their email.
*/ */
export const findOrCreateCustomerStep = createStep( export const findOrCreateCustomerStep = createStep(
findOrCreateCustomerStepId, findOrCreateCustomerStepId,