Default constructor. Alwyas use getInstance() instead of default contructor to get an instance of the SDK.
B2BSDKConfig Config to initialize this SDK.
stores the products in the cart
The UserContext used for this SDK.
The datasource connection used by this SDK.
Private singleton instance of this SDK. There should always be only 1 instance.
Customers can override their custom anonymous URL using apiURL
Customers can set the anonymous URL auth token using authToken
getter method for namespace. Provides the salesforce org namespace
setter method for namespace. Set custom namespace
Add the product to the cart.
addProductToCart SDK call posthook method.
addProductToCart SDK call prehook method.
apply adjustments for the given cartItem.
applyAdjustment SDK call posthook method.
applyAdjustment SDK call prehook method.
Clone Line Items in the cart.
cloneItems SDK call posthook method.
cloneItems SDK call prehook method.
Create a default AddToCartItemInput object.
Create a default ApplyAdjustmentInput object.
Create a default CloneItemsInput object.
Create a default DeleteCartItemInput object.
Create a default DeletePriceAdjustmentInput object.
Create a default GetCartItemsInput object.
Create a default GetCartLineItemPricesInput object.
Create a default GetCartProductsInput object.
Create a default GetCartItemsInput object.
Create a default GetCatalogsInput object.
Create a default GetPriceDetailsInput object.
Create a default GetTimeListsInput object.
Create a default UpdateCartLineItemInput object.
Returns the working cart details.
Create a default createWorkingCartInput object.
createWorkingCart SDK call posthook method.
createWorkingCart SDK call prehook method.
delete the line item to the cart.
deleteCartItem SDK call posthook method.
deleteCartItem SDK call prehook method.
Delete Price Adjustments for the Line Items in the cart.
deletePriceAdjustments SDK call posthook method.
deletePriceAdjustments SDK call prehook method.
get all cart items for the given cartId.
getCartItems SDK call posthook method.
getCartItems SDK call prehook method.
get the prices for the given cartitem.
getCartLineItemPrices SDK call posthook method.
getCartLineItemPrices SDK call prehook method.
Get cart products.
getCartProducts SDK call posthook method.
getCartProducts SDK call prehook method.
get cart summary for the given cartId.
Returns the existing cart item details in the SDK
optional parameter - set to TRUE if you want original API response.
getCartSummary SDK call posthook method.
getCartSummary SDK call prehook method.
Get catalogs.
getCatalogs SDK call posthook method.
getCatalogs SDK call prehook method.
Get Price Adjustments Details for the Line Items in the cart.
getPriceDetails SDK call posthook method.
getPriceDetails SDK call prehook method.
Get existing time plans and policies.
getTimeLists SDK call posthook method.
getTimeLists SDK call prehook method.
Returns a API call response.
Invoke an action returning from previous API call.
Returns a DataRaptor call response.
// Invoke your API with invokeAction method b2bExpressSDK .invokeDataRaptor(input) .then(response => { Logger.info( "Invoke DataRaptor Response" + response ); }) .catch(error => { Logger.info( "Invoke DataRaptor call failed" + error ); }); ```
Returns a VIP call response.
// Invoke your API with invokeAction method b2bExpressSDK .invokeIntegrationProcedure(input) .then(response => { Logger.info( "Invoke VIP Response" + response ); }) .catch(error => { Logger.info( "Invoke VIP call failed" + error ); }); ```
Update the line item to the cart.
updateCartLineItem SDK call posthook method.
updateCartLineItem SDK call prehook method.
Returns the version number of SDK.
Returns SDK version number as string
Create a B2BSDKConfig object that consists of a UserContext and a DataSourceService for anonymous user.
Configuration object to instantiate SDK.
Create a B2BSDKConfig object that consists of a UserContext, DigitalCommerce and a DataSourceService for login user.
optional
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
Get a singleton instance of this SDK.
SDK instance.
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
B2B Express Facade to interact with Vlocity B2B Express functionality.
The B2B Express SDK is a JavaScript library that abstracts and simplifies the use of V2 & V3 API REST calls.
The SDK provides error checking and validates parameters before submitting them to the APIs, ensuring that calls to the APIs are well formatted and complete. In some cases, the SDK invokes more than one API to complete a request.
Using the SDK ensures that errors are detected before API calls are made, ensuring that Vlocity data structure rules are enforced and that data is not written incorrectly to the Vlocity cart or to the product database.Using the SDK reduces UI development efforts by consolidating common application and business logic to use the APIs.
SDK can be shared by different applications user interfaces. SDK, like any Vlocity SDK, can be extended and overrided to customized implementations.
109.0.0