Developer Resources
Create Quote & Create Order Gl...
API Reference: Request & Response Types
31 min
this article documents every type used by the create quote and create order apex global methods all types are global inner classes of ruby globalapitypes , accessible from any apex code in the org entry points create quote ruby globalapitypes createquoteresponse response = ruby globalquoteserviceapi createquote(request); class ruby globalquoteserviceapi method global static ruby globalapitypes createquoteresponse createquote(ruby globalapitypes createquoterequest req) create order ruby globalapitypes createorderresponse response = ruby globalorderserviceapi createorder(request); class ruby globalorderserviceapi method global static ruby globalapitypes createorderresponse createorder(ruby globalapitypes createorderrequest req) request types createquoterequest the top level request object for creating a quote global class createquoterequest { global boolean iscommit; global quote quote; global list\<productinput> products; global opportunity opportunity; global id accountid; } true 165,165,165,167 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type quote fields the quote field is a standard salesforce quote sobject key fields commonly used with this api are listed below for a comprehensive list of all quote fields, see the https //api docs nue io/get object definition endpoint ( get /metadata/objects/quote ) custom fields on the quote header are also supported — see true 132,132,132,132,134 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type term calculation you can provide any two of ruby subscriptionstartdate c , ruby subscriptionenddate c , and ruby subscriptionterm c — the third is calculated automatically if only startdate is given, the default term depends on your org's system settings https //docs nue io/multiple currencies orgs set currencyisocode on the quote via quote put('currencyisocode', 'eur') if omitted, defaults to the running user's default currency createorderrequest the top level request object for creating an order mirrors createquoterequest but uses an order sobject instead of quote global class createorderrequest { global boolean iscommit; global order order; global list\<productinput> products; global id accountid; } true 165,165,165,167 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type order fields the order field is a standard salesforce order sobject key fields commonly used with this api are listed below for a comprehensive list of all order fields, see the https //api docs nue io/get object definition endpoint ( get /metadata/objects/order ) custom fields on the order header are also supported true 132,132,132,132,134 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type productinput defines a product to add to the quote or order for https //docs nue io/product bundle , use the addons field to specify optional add on products global class productinput { // product identification (at least one of productsku or productname required) global string productsku; global string productname; global string pricebookentryid; // quantity & uom global decimal quantity; global string uom; global id uomid; // term & dates (per product overrides) global date startdate; global date enddate; global decimal subscriptionterm; global string subscriptiontermdimension; // subscription settings global boolean autorenew; global boolean evergreen; global decimal renewalterm; global string billingperiod; global string billingtiming; // discounts global decimal discount; // percentage (0 100) global decimal discountamount; // currency amount // pricing global list\<pricetaginput> pricetags; global list\<custompricingattribute> custompricingattributes; // bundle add ons global list\<productinput> addons; // custom fields global map\<string, object> customfields; } true 165,165,165,167 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type validation rules the api validates each productinput and returns structured errors true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type custompricingattribute used to filter pricebookentry selection by https //docs nue io/multi attribute pricing#use custom fields of price book entry as pricing a this is for price book entry custom fields used as pricing dimensions — not for account type auto resolution (which happens automatically via the pricingattribute mapping) global class custompricingattribute { global string name; // custom field api name on pricebookentry global string value; // value to match } true 165,165,165,167 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type multiple attributes are combined with and logic — only price book entries matching all specified attributes are selected response types createquoteresponse global class createquoteresponse { global string status; // "succeed" or "failure" global quotedto data; // quote + line items (null on failure) global list\<message> warnings; // non fatal messages global list\<message> errors; // fatal errors (populated on failure) } true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type createorderresponse global class createorderresponse { global string status; // "succeed" or "failure" global orderdto data; global list\<message> warnings; global list\<message> errors; } same structure as createquoteresponse but wraps an orderdto instead quotedto global class quotedto { global quote quote; global list\<quotelineitemdto> lineitems; // flattened, depth first order } true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type orderdto global class orderdto { global order order; global list\<orderitemdto> lineitems; } quotelineitemdto global class quotelineitemdto { global quotelineitem quotelineitem; global string id; // internal line id global string parentid; // parent line id (for bundle children) global uom uom; global lineitemproduct product; global lineitemproductoption productoption; global list\<pricingdimension> appliedpricetags; global list\<priceimpactresult> priceimpacts; } true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type key quotelineitem pricing fields the following are key pricing fields returned on each quotelineitem for a comprehensive list of all quotelineitem fields, see the https //api docs nue io/get object definition endpoint ( get /metadata/objects/quotelineitem ) custom fields on quotelineitem are not directly settable via the api — see for the two step workaround true 331,331 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type orderitemdto global class orderitemdto { global orderitem orderitem; global string id; global string parentid; global uom uom; global lineitemproduct product; global lineitemproductoption productoption; global list\<pricingdimension> appliedpricetags; global list\<priceimpactresult> priceimpacts; } same structure as quotelineitemdto but wraps an orderitem instead of quotelineitem for a comprehensive list of all orderitem fields, see the https //api docs nue io/get object definition endpoint ( get /metadata/objects/orderitem ) custom fields on orderitem follow the same two step pattern as quotelineitem — commit the order first, then update line items via standard dml message used for both errors and warnings the structured format enables ai systems and integrations to programmatically interpret outcomes global class message { global string errorcode; // severity "error", "warning", or "fatal" global string errortype; // specific code (e g , "product sku or name required") global string message; // human readable description } true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type error codes true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type warning codes true 220,220,222 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type
Have a question?
Get answers fast with Nue’s intelligent AI, expert support team, and a growing community of users - all here to help you succeed.
To ask a question or participate in discussions, you'll need to authenticate first.