Asset To Basket

The Asset to Basket API converts the asset to a basket on which basket operations can be performed. This API is only for logged-in users.

The API accepts the list of root Items IDs in the input and gets the assets bundle to convert to a basket. The API has a similar cache hit when the basket with the same context key has been cached. A cache miss occurs when the basket and order configurations are not found in the cache. There is also a mode of a partial cache hit when the basket with a superset key (containing all promotions and adjustments that are valid based on requested date-time) is present in the cache. However, some of the adjustments and promotional items must be trimmed from the request date time. This partial hit mode operates in memory. Therefore, the flow does not need to go through the full v2 FDO mode, thereby greatly reducing the processing time.

With versioning enabled, the assets and promotional products or associated adjustments can be versioned. During the key computation, the system takes into account the shape of the assets, including promotions, adjustments, and asset line items. The shapes for whom assets were created could be the same but the product versions may differ, thereby creating the same bundle shape for assets that could be incorrect.

During the asset shape computation, the system considers the time slice of the root assets as well. The time-sliced dates for the asset root products at the time they were converted to assets are included in the context key computation.

In case of a cache miss scenario, while doing v2 FDO implementation, the reference dates and request date-time are passed to the FDO implementation, pricing, validation, and response generator services. The basket is still cached with the default cache policy because the version date-times are included on the context key itself.

The basket operations on the assetized baskets still include the reference time as the time when the asset to basket was done (cache hit). The corresponding cardinality validation service takes that cached version information into consideration. The reference date information is cached in the basket wrapper and any operation done on the assetized basket includes the version information in its key computation.

Asset to Basket API