Explanation
Understanding Auto Order State
Auto Orders can transition through multiple states based upon how the payments process, customer actions, and merchant actions. The list below describes several scenarios and how the properties on the auto order object will behave.
Scenario: Auto order in good standing
- enabled = true
- credit_card_attempt = 0
- all item[].next_shipment_dts > now
Scenario: An auto order item runs its complete schedule successfully
- enabled = true (the auto order is not disabled)
- disabled_dts is not set
- item[].next_shipment_dts = 1/1/2030 for each item whose schedule has ended
Items that still have scheduled steps keep their real next_shipment_dts. When every item has ended, the auto order is still enabled, with every item[].next_shipment_dts at 1/1/2030, and nothing further is billed. Because the auto order is not disabled, the auto_order_disable webhook does not fire. The StoreFront Communications flow trigger autoorder:item schedule complete fires once per item, after the rebill that ends its schedule succeeds.
Scenario: Auto order disabled after a set number of orders
- cancel_after_next_x_orders counts down by one on each successful rebill
- when it reaches 0: enabled = false and disabled_dts = date/time the auto order was disabled
Scenario: Card has declined at least once, but auto order is still active and will be retried
- enabled = true
- credit_card_attempt = number greater than zero
Scenario: Card is attempted X times, declines, and the auto order disabled.
- enabled = false
- disabled_dts = date/time the auto order was disabled
- credit_card_attempt = number of attempts that have been made
Scenario: Customer cancels the auto order via an interactive cancellation form or easy cancel email (if the merchant has that enabled)
- enabled = false
- canceled_by_user = "customer"
- canceled_dts = date/time of the activity
Scenario: Merchant goes into the auto order editor and sets the status to "canceled by customer"
- enabled = false
- canceled_by_user = "customer"
- canceled_dts = date/time of the activity
Scenario: Merchant goes into the auto order editor and sets the status to "canceled by merchant"
- enabled = false
- canceled_by_user = "login that perform the cancel"
- canceled_dts = date/time of the activity
Scenario: Merchant goes into the auto order editor and sets the status to "disabled"
- enabled = false
- disabled_dts = date/time the auto order was disabled
Was this page helpful?