order_abandoned

Fired when the abandoned-cart reminder is sent for a draft order.

When: the abandoned-cart reminder runs for a draft order. A cron (every 5 min) picks draft orders that have a transactionId, are neither archived nor rejected, and whose customer has an email. The event fires once, after the shop's dunning delay (dunning.dunningMinutes), and only if no reminder was sent for the order or the customer yet. Shops whose group has managesCustomerRecovery turned off are excluded.

FieldTypeDescription
subscriptionIdstringGreenLeaze order id. Not id.
transactionIdstring
sourcestring | nullOrder origin.
emailstringCustomer primary email.
phonestring | null
firstNamestring | null
lastNamestring | null
lastPaymentMethodEnteredAtstring | nullLast time the customer entered a payment method.
lastDunningSentAtSubscriptionstring | nullPrevious reminder for this order.
lastDunningSentAtCustomerstring | nullPrevious reminder for this customer.
subscriptionLinesline[]See below.

Customer email: { "email": string, "sources": ("DECLARED" | "ROLLEE")[], "isPrimary": boolean }.

subscriptionLines[], the public line shape:

FieldTypeDescription
idstringGreenLeaze order line id.
namestring
combinationstring | nullVariant label.
quantitynumber
rentalbooleanfalse for a purchased (non-rented) line.
durationnumber | nullRental length; null for a purchase.
unitPricenumberUnit price HT after discount.
unitPriceWithNoDiscountnumber | nullUnit price HT before discount, when a discount applies.
priceMonthlynumberMonthly rent HT per unit, before monthly discount.
priceDepositnumberDeposit HT per unit.
fixedDepositnumber | null
discountFirstMonthnumberFirst-month discount (%).
vatnumber
deletablebooleanWhether the customer may remove the line.
imagestring | nullProduct image URL.
{
  "subscriptionId": "5b0f7c1e-2d7a-4a59-9d6b-3c1f0e0c9a11",
  "transactionId": "GLZ-8F3K2",
  "lastPaymentMethodEnteredAt": null,
  "lastDunningSentAtSubscription": null,
  "lastDunningSentAtCustomer": null,
  "email": "[email protected]",
  "phone": "+33612345678",
  "firstName": "Jean",
  "lastName": "Dupont",
  "subscriptionLines": [
    {
      "id": "c3f1…",
      "name": "MacBook Pro 14\"",
      "duration": 12,
      "combination": "Gris sidéral",
      "unitPrice": 2082.5,
      "priceDeposit": 0,
      "priceMonthly": 74.92,
      "discountFirstMonth": 0,
      "unitPriceWithNoDiscount": null,
      "quantity": 1,
      "vat": 20,
      "deletable": true,
      "rental": true,
      "fixedDeposit": null,
      "image": "https://cdn.example.com/macbook.png"
    }
  ],
  "source": "dashboard"
}