Post-Purchase Upsells & Order Edit Lifecycle — RUTHH COD Form & Upsells
Goal and Expected Result
Section titled “Goal and Expected Result”Configure Sales Booster → Post-Purchase Upsells (/app/sales-booster/post-purchase-upsells) and understand how accepted post-order offers are added to the original Shopify COD order using orderEditBegin, orderEditAddVariant, orderEditAddLineItemDiscount, and orderEditCommit.
Preconditions
Section titled “Preconditions”- Order Creation Mode in Settings → General (
/app/settings/general) is set to Standard COD Order (orderCreate), NOT Save as Draft Order. - After-Purchase Destination is set to the In-Modal Thank You View (
M15_MODAL).
Numbered Instructions
Section titled “Numbered Instructions”1. Configure a Post-Purchase Upsell Offer in Admin
Section titled “1. Configure a Post-Purchase Upsell Offer in Admin”- Navigate to Sales Booster → Post-Purchase Upsells (
/app/sales-booster/post-purchase-upsells). - Click Create post-purchase offer.
- Select the trigger eligibility (all orders or specific trigger products/collections).
- Choose the upsell product/variant to offer and configure its post-purchase discount (
PERCENTAGEorFIXED_AMOUNT). - Customize the offer headline, urgency timer/copy, and accept/decline buttons, then click Save.
2. How the Post-Purchase Order Edit Lifecycle Works
Section titled “2. How the Post-Purchase Order Edit Lifecycle Works”When POST_PURCHASE_RUNTIME=enabled is active and a buyer submits a standard COD order:
- Initial Order Creation: The buyer’s primary COD order is created immediately in Shopify via
orderCreateso the base sale is never put at risk even if the buyer closes their browser during the post-purchase step. - Offer Presentation: Before showing the final confirmation screen inside
M15_MODAL, the storefront presents the eligible Post-Purchase Upsell offer. - One-Click Acceptance & Order Edit Reconciliation: If the buyer clicks Accept:
- The server verifies the signed post-purchase token and checks that the offer has not already been redeemed (idempotency guard).
- The server calls Shopify Admin GraphQL
orderEditBeginon the newly created Shopify order. - It adds the upsell variant via
orderEditAddVariantand applies the configured discount viaorderEditAddLineItemDiscount. - It commits the edit via
orderEditCommitand appends audit tags/notes.
Warnings and Edge Cases
Section titled “Warnings and Edge Cases”- Draft Orders Cannot Be Edited via
orderEditBegin: Shopify’s Order Edit GraphQL API operates only on finalizedOrderobjects (gid://shopify/Order/...). When a store uses Save as Draft Order (draftOrderCreate), the server automatically skips post-purchase offer presentation. - Unfulfilled / Editable Order State Required: If an external ERP or fulfillment automation immediately archives or locks the Shopify order within milliseconds of creation,
orderEditBeginmay be rejected by Shopify; in that case, the original COD order remains intact.
Troubleshooting Steps
Section titled “Troubleshooting Steps”- Post-purchase offer does not appear after order submission:
- Check whether
POST_PURCHASE_RUNTIME=enabledis active for your environment. - Confirm Settings → General is set to Standard COD Order and In-Modal Thank You View (
M15_MODAL). - Confirm the offered upsell variant is in stock and not identical to an excluded item.
- Check whether