This shows you the differences between two versions of the page.

appendixd:newquotewebmethod:newquoteexecutionflow [2011/02/10 02:21]
appendixd:newquotewebmethod:newquoteexecutionflow [2011/02/10 04:29] (current)
Line 1: Line 1:
 +====== New Quote - Execution Flow ======
 +1)   API Cart is deserialized from input XML This will brake if input XML is not valid XML\\ 
 +2)   API Cart is checked if it contains all required fields This will brake if API Cart (input XML) is missing some required filed \\ 
 +3)   New Current Cart is created – it’s empty \\ 
 +4)   Current Cart Market is set based on MarketCode field from API Cart API call will fail if MarketCode field in API Cart has a value not recognized as CPQ defined Market \\
 +5)   All Properties from API Cart will be added to Current Cart. If a property is not recognized API call will fail. \\ 
 +6)   For each Customer for API Cart, a search is performed on saved CPQ customers. If match found that customer will be added to Current Cart. If no match is found a new Customer will be created based on data from API Cart. If searching by either CPQ or External ID, and if that search fails, API call will fail. \\ 
 +7)   If Crm/OpportunityId node is present, and if Crm node has “ApplyMappings” attribute set to true, CRM mappings OnQuoteCreate/Update with direction CRM -> CPQ will be executed. Values from CRM are downloaded to CPQ quote. If mapping function fails, the API call will fail, too. Newly created quote will be deleted, and the caller will get the error message describing what happened. If Crm node has no “ApplyMappings” attribute present, or if attribute is set to “0” (false), this step will not be executed at all.\\  
 +8)   For each item in API Cart a reverse search will be performed. If search fails API call will fail too. If search is successful a new item will be added to Current Cart. It will have default discounts set. If item's catalog code reverses to an incomplete configuration, and cart owner's group doesn't allow incomplete configurations to be stored, API call will fail, and the caller will be notified of error. \\ 
 +9)   For each item and for each of it's attributes that are given values in XML, the values will be set. If attribute has an invalid name for that item, or if attribute has an invalid value, the API call will fail. Setting Attributes for items can lead to incomplete configurations. If configuration is incomplete, and quote owner user belongs to a group that is set not to be able to create quotes with incomplete configurations, API call will fail, and the user will get an error message about it. \\ 
 +10) If PromoCode is found in API Cart it will be checked and if valid special discounts will be applied to Current Cart items. This will overwrite default discounts. If PromoCode is invalid API call will fail. \\ 
 +11) Shipping method in Current Cart will be selected as specified by ShippingMethod field from API Cart. If such shipping method is not available the API call will fail. ShippingCost from API Cart is set to Current Cart. \\ 
 +12) For each item in API Cart, if ItemPrice is available, discount of corresponding Main item in Current Cart will be recalculated to match the specified price in API Cart. This will not affect additional line items, if any, of that item – just the main item discount. This will overwrite previously set discounts (default or promo code discounts). This may exceed allowed discount.  \\ 
 +13) If CRM “Crm/OpportunityId” node is present in input XML, CPQ quote will be linked with CRM opportunity. Additionally, if Crm node has “ApplyMappings” node present, and set to “1” (true),  mappings OnQuoteCreate/Update with direction CPQ -> CRM will be executed. Values from CPQ quote are uploaded to CRM. If mapping function fails for some reason, API call will fail, the newly created quote will be deleted, and the caller will get an error message describing what happened. If “ApplyMappings” node is not present, or if it is set to “0” (false), mappings won't be executed. The quote will be only linked to opportunity, without any mappings. If Optional OpportunityName node is present, in the case when no mappings are executed, Opportunity name will be populated from this node. \\ 
 +14) The Quote is saved \\ 
 +  * Alternative Flows – API Call failures
 +  * Input XML is invalid XML
 +  * Input XML does not contain all required fields
 +  * Supplied MarketCode is not valid CPQ Market code
 +  * Unrecognized quote property strong name
 +  * Invalid Zip code supplied in input Customer
 +  * Invalid PartNumber is supplied
 +  * Invalid attribute name is supplied
 +  * Invalid attribute value is supplied
 +  * Invalid PromoCode is supplied
 +  * Invalid customer Id is supplied
 +  * Supplied ShippingMethod is not available
 +  * CRM mappings failed due to communication or other error type
You are here: SAP Sales Cloud CPQ Online HelpSAP CPQ APINew Quote Web MethodNew Quote - Execution Flow