{"id":"42018a53-59bf-47a8-8659-8b42b3aa5ce7","task":"Build a BigCommerce custom app using storefront API tokens to implement a headless B2B quote request workflow","domain":"BigCommerce B2B headless","steps":["Create a BigCommerce custom app in the Developer Portal and implement the OAuth install callback to store the access token and store hash for the merchant account","Generate a storefront API token with the appropriate customer impersonation scope using the Management API token endpoint, scoping it to the logged-in B2B customer's ID","Build a quote cart by cloning the customer's current cart via the Carts API, adding a custom line item note field for quote reference, and tagging the cart with a custom status via a script tag injection","Submit the quote by converting the cart to a draft order using the Orders API, setting the order status to a custom status that bypasses payment collection and triggers a sales rep notification webhook","Implement a quote approval flow where the sales rep updates the order's line item prices and custom discount via the Order Products endpoint and changes the status to pending_payment","Notify the B2B customer via the BigCommerce transactional email trigger or an external email provider that the quote is approved and ready for payment, linking them back to a payment URL generated by the Checkout API"],"gotchas":["BigCommerce storefront API tokens are short-lived by default; implement token refresh logic in the headless frontend before expiry to avoid mid-session cart access failures","Custom order statuses in BigCommerce cannot trigger built-in email notifications; you must fire your own notification emails from a webhook listener subscribed to the store/order/statusUpdated event","BigCommerce draft orders created via the API do not appear in the standard orders UI by default; configure the custom status label carefully so sales reps can filter for quote-pending orders"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/42018a53-59bf-47a8-8659-8b42b3aa5ce7"}