Private singleton instance of this SDK. There should always be only 1 instance.
getter method for namespace. Provides the salesforce org namespace
setter method for namespace. Set custom namespace
Add the product to the cart.
Add an addon to the cart.
Add a promo to the cart.
Apply adjustment to given cart item
Apply Discount to cart
applyDiscount sdk post hook method
applyDiscount sdk pre hook method
Apply Discount to the cart
Clones an item in a cart
Clone the line items.
Add a product to the cart such that it can be configured.
Create a default AddToCartItemInput object.
Create a default InvokeActionInput object.
Create a default addToCartPromoItem object.
Create a default ApplyAdjustmentInput object.
Create a default ApplyDiscountInput object
Create a default ApplyDiscountToCartInput object.
A workaround mechanism for v102 when getProducts API do not relate attribute id to attachment url. Here we assume Admin would have configured the url such that it is appended by a vertical bar followed by attribute id, we would then split them apart and create a map that pairs the attribute id to the attachment url.
Returns anonymous cartId and accountId.
Create a default CloneItemInCartInput object.
Create a default CloneItemsInput object.
Create a default InvokeActionInput object.
Create a default CreateCartInput object.
Create a default InvokeActionInput object.
Create a default DeleteDiscountInput object
Create a default DeleteItemFromCartInput object.
Create a default DeletePriceAdjustmentInput object.
Create a default DeletePromotionInput object
Create a default InvokeActionInput object.
Create a default InvokeActionInput object.
Create a default GetCartSummaryInput object.
Create a default GetCatalogsInput object.
Create a default getListsOfValuesInput object.
Create a default GetPriceDetailsInput object.
Create a default InvokeActionInput object.
Create a default GetProductsInput object.
Create a default InvokeActionInput object.
Create a default InvokeActionInput object.
Returns the working cart details.
Create a default createWorkingCartInput object.
Delete a line item from the cart.
Delete Discount from cart
deleteDiscount sdk post hook method
deleteDiscount sdk pre hook method
Delete an item from the Cart. Both root & child items can be deleted using this API
Deletes a price adjustment for an item in a cart
deletePriceAdjustment sdk post hook method
deletePriceAdjustment sdk pre hook method
Delete Promotion from cart
deletePromotion sdk post hook method
deletePromotion sdk pre hook method
Get cache type
Retrieves the cart items.
getCartItems sdk post hook method
getCartItems sdk pre hook method
Fetch prices of all the line items in a given cart
Retrieves the summary of a cart
getCartSummary sdk post hook method
getCartSummary sdk pre hook method
Returns a list of catalogs.
Get Time Plans, Time Policies and Adjustment Codes
Retrieves the price waterfall for an item in a cart
getPriceDetails sdk post hook method
getPriceDetails sdk pre hook method
Returns a list of products.
Returns a list of products using action object from getCatalog API.
Returns a list of Ppromotions.
Get the userContext used in this CPQ SDK instance or create a new one if create is true.
flag to indicate to create a new UserContext if true. Otherwise, return UserContext in the sdk.
Get the CPQSDKConfig used in this CPQ SDK instance.
CPQSDKConfig.
Invoke an action returning from API call.
Returns a VIP call response.
// Invoke your API with invokeAction method cpqSdk .invokeIntegrationProcedure(input) .then(response => { Logger.info( "Invoke VIP Response" + response ); }) .catch(error => { Logger.info( "Invoke VIP call failed" + error ); }); ```
Update a root bundle or line item in the cart.
Update quantity, fields, and attributes for a specified line item in the cart. To persist changes after calling this API, you must call the Update Items in Cart API
Returns the version number of SDK.
Returns SDK version number as string
Returns configuration for anonymous users.
Create a CPQSDKConfig object that consists of a UserContext and a DataSourceService for login user.
Configuration object to instantiate SDK.
Adds all the enumerable string keyed function properties of a source
object to the sdk prototype.
.extend
should only be used to add new methods and it won't override the existing methods.
Note: If the property already exists, it will be not be added.
Custom functions which are being extended should have proper namespaces to avoid issues during upgrades. When Vlocity releases new changes it won't impact if unique namespaces are used.
Example: myCompanyOrFeatureMethodName
The object of functions
Adds all the enumerable string keyed function properties of a source object to the sdk prototype.
.override
method should only be used to override the existing methods and should only be used in rare cases.
Overriding the existing or default methods may cause unintended consequences and may also impact during upgrades.
Please be cautious while using this
The object of functions
Generated using TypeDoc
The Facade to interact with Vlocity CPQ functionality.