Most of the work happens in Commerce checkout flow configuration. The Contract write is downstream of the checkout but driven by what the buyer selects.
- Enable Subscription Management or Revenue Cloud
Setup, search for Subscription Management. Enable. License is required separately; check entitlements.
- Configure subscription product types
For each product that should generate a Contract at checkout, set the product configuration in Product2 or in the Revenue Cloud Product Catalog with Recurring Billing = true and a default Contract Term.
- Build or customize the Commerce checkout flow
Use Commerce Cart Checkout flow templates. Add a step at the end that calls the Subscription Management invocable action to create the Contract from the Cart state.
- Test with each subscription product
Walk through checkout for each subscription product type. Confirm the Contract record is created, Contract Line Items are populated, and the signed document is attached.
- Set up Contract lifecycle automation
Build the renewal, modification, and termination flows on the Contract object. Subscription Management ships templates for these; customize per business rules.
- Test edge cases
Multi-product carts mixing subscription and one-shot items. Bulk discount logic that should reflect on the Contract. Refund or cancellation immediately after checkout.
- Contract Term defaults to 12 months in Subscription Management if not set. Multi-year and monthly deals need explicit Contract Term values at checkout.
- Order Product and Contract Line Item are separate records. Reconciliation between them is the most common source of billing errors; make Apex tests cover the match.
- Customer signature workflows must complete before the Contract is marked Active. Activating without a signature creates audit problems downstream.
- Mid-term modifications create new Contract Line Items or update existing ones depending on configuration. Decide the pattern early; switching later creates data drift.
- Multi-currency contracts inherit the currency of the buyer Account, not the user creating the contract. Wrong inputs cause wrong invoices.