New Quote Details

<MarketCode >

  1. If this field is missing, quote’s owner’s default market will be

used for the quote.

  1. If this field is supplied, the value found in XML has to match one

of the market codes in the CPQ system.

  1. If the match is not found, the quote will not be created and the

result sent to the API caller will contain the reason for the API call’s failure.
<ShippingMethod>

  • This field is required
  • Value found in XML has to match one of the valid shipping methods

from CPQ system.

  • If the match is not found, the quote will not be created and the

result sent to the API caller will contain the reason for the API call’s failure.
<ShippingPrice>

  • This field is not required
  • If this node is empty or not found, cpq will provide the shipping

price based on the shipping method specified in the node <ShippingMethod>.

  • If this node is found and is not empty, the numeric value written

in the node will be used as shipping price. If the value is not numeric, the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. If the shipping price is found to be 0, the shipping price will be set to zero without further calculations.
<TaxExempt>

  • This field is not required
  • It can have following values: 0, 1, true, false
  • If node is missing, or it doesn’t have one of the values above, it

will be considered to be false (or 0)

  • If the node of the value is 0 or false, the tax calculated for the

created quote will be included in the total price.

  • If the node of the value is 1 or true, the tax calculated for the

created quote will not be included to the total price.
<CartComment>

  • This field is not required.
  • The value written in this node will be saved as created quote’s

comment.
<PromoCode>

  • This field is not required
  • If this field exists and is not empty, the value written in this

node has to be a valid promo code. Valid promo codes are kept in CPQ database.

  • If promo code is not valid, the quote will not be created and the

result sent to the API caller will contain the reason for the API call’s failure.


<Crm>

  • This node, is optional, but if present, then it must have its

children populated.

  • (Attribute) ApplyMappings – This attribute is optional. If

omitted, default is false. This attribute is intended for users to choose if they want to execute CRM mappings when linking opportunity to newly created quote. If this is set to true, CRM mappings would be executed. If false, the quote will only be linked to opportunity, without any data exchange between CPQ and CRM system in any direction. <OpportunityId>

  • This field is required if it is contained in “Crm” node (which is

optional – this means that “Crm” node, along with this child of it can be omitted from the input XML, but if “Crm” node is present, this node is a required node.

  • Id from the CRM opportunity. If supplied, the quote will be

attached to the opportunity on the CPQ side. But field mappings will not be done by default. Attribute called ApplyMappings needs to be set to true, if caller wants CRM mappings to be executed. In this case, complete mappings are executed, and all needed data is exchanged between CPQ and CRM. Note that this option results in slower API requests, since additional communication needs to be done between CPQ and CRM. If network errors occur, this can also lead to API call failures. If this call to CRM fails for any reason, new quote won't be created, and the API caller will get NOK result XML which will contain error that CRM system reported. If ApplyMappings attribute is set to “false” or omitted from input XML, mappings won't be executed, and the API caller is responsible to maintain data integrity between CPQ quotes and CRM opportunities. All fields which get copied from opportunity to quote won't get copied, so API caller must provide them manually via new quote input xml. This option is however, faster than when mappings are executed. Please note that CRM mappings need an CRM administrative account set up in CPQ in order to be executed. So if you use this option, and if the account is not set up, API call will fail, and you will be notified about error, in result xml. <OpportunityName> - This node is optional. If supplied, Opportunity name will be populated when likning quote to opportunity. Please note that, when “ApplyMappings” attribute is set to “1”, the opportunity name node will be ignored, and the opportunity name will be populated while doing mappings. (It will be downloaded from CRM). <Items>

  • All nodes labeled <Item> found under <Items> will be added to the

quote

  • If reverse search for any of the items catalogue codes returns

negative result, the quote will not be created. * <Item> n <Quantity> · This is required field. · The value of this node has to be numeric, otherwise the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. · The value written in this node will be applied to the main configuration item. · Additional configuration items will have quantities that are set up as default quantities for these attributes in product’s model administration. · If in the product’s model administration the quantity of main configuration item is set up to be applied to additional configuration items, the value of this node will be multiplied with default quantities for additional configuration items.
n <CatalogueCode> · This is required field. · CPQ will perform the reverse search based on this catalogue code. · If the appropriate product model is found based on the catalogue code, CPQ will add main and additional configuration items (if any) for this product model to the quote. · If no product model is found based on the catalogue number, the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure.
n <ItemPrice> · This field is not required. · If this field is not found or is empty, the product model configuration price will be calculated by the appropriate formula defined for this product model in administration. In the created quote, default discounts will be applied to main and additional configuration items. · If this field has numeric value that will be the price in the quote for this product model. The product model configuration price will be calculated by the appropriate formula defined for this product model in administration. In the created quote, default discounts will be applied to additional configuration items. For main configuration item, discount will be calculated based on the value written in this node. Formula used for calculating discount for main configuration item:

  • (<ItemPrice> - sum(discounted additional conf. items)) / (price

for main conf. item from product model)
n <Attributes>
This field is not required. If this node is supplied, attributes for the item will be set as given in the input xml. This will change the product configuration, which may turn to an incomplete product after change.
<Attribute>-:$ <Name>
n This field is required n The field represents the attribute name n If there is no Attribute in item with given name, quote will not be created, and the API call will fail and the result will contain the reason for API call's failure. <Value>

  • This field is required
  • If the attribute has several values, each one that needs to be set

should be set in the separate value XML tag.

  • The field is used to set a value to an attribute with given name
  • If the attribute is not a free form attribute, and the value is

not found to be valid for that attribute, the API call will fail and the result will contain the reason for API call's failure.

<Properties> * <Property> o <Name> n This field is required n This field represents the strong name defined in CPQ administration for some quote property. If the value of this node does not correspond to some of the strong names defined for the owner of the created quote, the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. o <Value> n this field is required n value of this node will be saved for the quote property with the strong name in the node <Name>
<Customers>

  • <Customer CustomerRoleType=“1”>-:$Before Customer is added to

a cart a lookup is performed in order to find out if such customer already exists in CPQ system.
Search is performed first by looking if CPQ customer's ID is present in input XML. (Node “Id”). If there is a customer with supplied ID, that customer will be used. If this id is supplied wrong, API call will fail, resulting with an message about the error that occurred. If CPQ customer's ID is not present in input XML (since it is not a required node), then External customer's id is searched (if present). It is contained in “ExternalId” node in input XML. This node is intended to uniquely identify customers bu using their Ids from an external system that has integration with CPQ. Cpq customers have that id stored in “customer code” field in database. If “ExternalId” node is present in input XML, then customers are searched by this id. If a match is found, this customer is used by API. If this search fails, API call will fail, and the caller will get the error message describing the problem. This node is not required, and when not supplied, customers are being searched by combination of first name, last name, company and address1. The search is case insensitive. If a customer is found, it will be used. Otherwise, if there’s no CPQ customer with this combination of first name and last name, a new Customer will be created for that Quote, using the supplied data. In any of these searches, if multiple records are found, the API will use the first one that database engine returns. Therefore, it is recommended not to use ambiguous customers identification in CPQ system. Please note here, that it is recommended to use Ids or ExternalIds since identification just by First name and Last name can cause to creation of many new customers over relatively small period of time, if there are many mismatches during customers searching. n (attribute) CustomerRoleType – defines customer role for this customer
(1 is for ‘Bill To’, 2 is for ’Ship To’ and 3 is for ‘End User’). All customer roles that are used in the system have to be defined in the XML, otherwise the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure.
o <Id> - Not Required o <ExternalId> - Not required o <FirstName> - Required o <LastName> - Required o <Company> - Not required o <Address1> - Required o <Address2> - Not required o <City> - Required o <StateAbbrev> - Required
Two letter abbreviation for one of the States defined in CPQ admin. If supplied value is not recognized as valid two letter state abbreviation the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. o <ZipCode> - Required o <CountryAbbrev> - Required
Three letter country abbreviation for one of the Countries defined in CPQ admin. If supplied value is not recognized as valid three letter country abbreviation the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. o <TerritoryName> - Not required
If supplied it should contain a name of a defined Territory in CPQ admin. If the value is not recognized as valid Territory name the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure. o <BusinessPhone> - Not required o <BusinessFax> - Not required o <Email> - Required
This field should contain valid email address. If the value is not valid email address the quote will not be created and the result sent to the API caller will contain the reason for the API call’s failure o <CRMAccountId> - Not required o <CRMContactId> - Not required

You are here: SAP Sales Cloud CPQ Online HelpSAP CPQ APINew Quote Web MethodNew Quote Details