Extensibility API Updates(2021.2.0 Release )

The following components have been updated with new methods in the 2021.2.0 release:

Cart – You can now trigger the add to cart behavior of a web store in an extension with the triggerAddToCartConfirmation() method. When an extension calls this method, it triggers the add to cart behavior that is configured in the web store settings, which gives a visual confirmation to the shopper that the item was added successfully to the cart.

Environment – This release includes a new method in the Environment component which lets you change how the Item Search API works. With the defineSearchMasterOptions() method, you can modify the value of any of the search API master options configured in the NetSuite account. Specifically, it enables you to update the searchApiMasterOptions configuration property of the web store by modifying or adding to any of its child properties. For example, if your extension enhances the PDP (product details page) and requires specific item information, you can use this method to change the field set that is used by the item search API on the PDP.

UserProfile – With the getCustomerSegments() method, you can now determine the customer segments that a website visitor belongs to. A customer segment is a group of customers to which you can assign a personalized catalog view (PCV). Note: To use this method the Personalized Catalog Views feature must be enabled in the NetSuite account.

The UserProfile component also includes two new methods that enable you to create a custom cookie consent extension. The setCookieOptions() method saves a customer’s cookie preferences on the customer record. The getCookieOptions() method retrieves the cookie preferences. The SuiteCommerce Analytics Data feature uses the customer’s cookie preferences to determine whether the customer’s website behavior data can be processed in NetSuite.

PDP – The getPrice() method lets you get price information of the item displayed on the PDP (product details page). Price information includes both the base price of the item and the current price of the item according to the currently selected quantity and item options.

Leave a comment

Your email address will not be published. Required fields are marked *