Create Order Overview
10 min
create order overview the nue cpq order apis provide rest endpoints for creating orders and change orders that directly provision subscriptions, assets, and entitlements unlike the quote apis, which are designed for pricing previews and approval workflows, the order apis are built for direct execution you submit an order, and the system creates the full downstream object graph in a single call there are two primary endpoints create order ( post /cpq/orders ) creates a new order with one or more order products in draft status after activation, subscriptions, assets, and entitlements are provisioned change order ( post /cpq/change order ) modifies existing subscriptions by creating a change order supports renewals, quantity changes, cancellations, upgrades, downgrades, and more endpoints endpoint method description /cpq/orders post create and activate an order (commit mode) /cpq/orders\ preview post preview an order without persisting (dry run mode) create order vs create quote the create order and create quote apis share the same product identification and pricing engine, but serve different purposes in the lifecycle feature create quote ( /cpq/quotes ) create order ( /cpq/orders ) product identification productsku + uom (or productname + uom ) productsku + uom (or productname + uom ) pricing resolution pricing engine resolves list price, discounts, price tags, and totals same pricing engine resolves list price, discounts, price tags, and totals preview mode yes ( \ preview endpoint for dry run) yes ( \ preview endpoint for dry run) required header fields opportunityid , name customerid , subscriptionstartdate output quote + quote line items order + order products + subscriptions + assets + entitlements activation separate activation step required orders are created in draft status; activation is a separate step change support create a new quote change order endpoint for modifying existing subscriptions bundle handling auto expands bundles, optional add ons via addons auto expands bundles, optional add ons via addons when to use create quote you need a pricing preview or what if scenario before committing you are building a quoting workflow with approval steps you want to associate the quote with an opportunity for salesforce workflows when to use create order you want to create an order directly without a quoting workflow you need the full provisioning result subscriptions, assets, and entitlements after activation you are making changes to existing subscriptions via the change order endpoint order lifecycle when you create and then activate an order, the following sequence occurs order created the order is created in draft status, then activated order products created each item in the products array becomes an order product record subscriptions provisioned recurring products generate subscription records with the specified start date, end date, and term assets created asset records are created to represent the customer's entitlement to each product entitlements created entitlement records are created to track what the customer has access to orders are created in draft status subscriptions, assets, and entitlements are not provisioned until the order is activated separately change order types change orders modify existing subscriptions each change is identified by an assetnumber and a changetype the following change types are supported change type description renew extend a subscription for a new term beyond its current end date updatequantity increase or decrease the quantity on an existing subscription updateterm modify the subscription term without changing other attributes coterm align a subscription's end date with another subscription (co termination) cancel cancel an active subscription as of a specified effective date reconfigure modify add ons or components within a bundle subscription adjustprice change the pricing on an existing subscription without modifying quantity or term convertfreetrial convert a free trial subscription to a paid subscription upgrade replace the current product with a higher tier product downgrade replace the current product with a lower tier product swap replace the current product with a different product (lateral move) change order processing options the proceedoption field determines how a change order is processed proceed option description createorder create a new order for the changes and optionally activate it useexistingorder add the changes to an existing draft order (requires containedobjectid ) createquote create a quote for the changes, enabling an approval workflow before activation useexistingquote add the changes to an existing draft quote (requires containedobjectid ) authentication all cpq order api requests require authentication using your nue api key in the nue api key header const myheaders = new headers(); myheaders append("nue api key", "your api key here"); myheaders append("content type", "application/json"); curl x post 'https //api nue io/cpq/orders' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ }' create order response when an order is created, the response includes order the order header object with status, dates, and totals orderproducts array of order products; bundle parents include nested children change order response when a change order is created and activated, the response includes headerobjectids the ids of created orders or quotes messages status messages for the operation subscriptions updated subscription records assets updated asset records entitlements updated entitlement records invoices invoice records generated for prorated charges (if billing is enabled) next steps docid\ ymmgzrhx6rmik18clykyl detailed guide with use cases for creating orders and change orders