Get Featured Offers API
The Get Featured Offers API provides the ability to retrieve a list of offers (products or promotions) that are modeled within the shared catalog which are sorted by a specified Catalog Product Relationship field. The specified catalog_code identifies the catalog that contains the offers. Offer eligibility can be determined by API parameters that support both anonymous and known user journeys.
This API supports a flag called isloggedin to indicate whether a user is logged in or anonymous. If the isloggedin parameter is true, it indicates a logged-in user, and an accountId must be specified in the context parameter of the API call. If the isloggedin flag is false, it indicates that the user is anonymous.
See Get Offer Details API for more information and examples. Also see Digital Commerce REST API.
-
Response contains Base Prices only (see Product Pricing in EPC)
-
No advanced rules are supported.
-
The Catalog should have the CatalogCodec field populated. No spaces are permitted in CatalogCodec.
-
Products should have ProductCode populated. No spaces are permitted in ProductCode.
-
Promotions should have Codec populated and no space is allowed in Codec.
-
Catalog should be present with products and promotions attached to it as records under CatalogProductRelationship__c object.
-
Catalog should be attached to a default price list through DefaultPriceListc field on Catalogc object.Pricelist entries should exist for all the products attached to the catalog.
-
All products present under associated promotions ( for a catalog ), must also have a relationship with catalog. Products should be added to Catalog, before adding them to any promotion associated with the catalog.
-
A record should be created under the Vlocity API Metadata object for getOffers API. This can be populated by running a batch job named as LOAD API METADATA which is present under CMT Administration > Cacheable API Jobs.
-
Optional: To cache records that are associated with the getOffers API you can optionally run the Populate API Cache batch job (located in CMT Administration > Cacheable API Jobs). After populating, context eligibility and pricing records, you can also run the batch job using the following statement:
database.executeBatch(new BatchCacheProcessor('getOffers'));
-
The Interface Implementation under ProductAvailability and ProductEligibiltiy is ignored. You must use Context Eligibility Rules to determine eligibility of Products. PricingRule and Tightest match for prices are not supported; however, base prices, adjustments, and override prices are supported.
For detailed API response descriptions, see Digital Commerce REST API.
For detailed API response descriptions, see Digital Commerce REST API.
You can return featured offers using the getOffersByCatalog API with the sortby parameter. First, populate the Sequence Number field for products and promotions in the catalog. Then make an API call similar to the following:
You can return featured offers using the getOffersByCatalog API for a logged in user with the sortby parameter. First, populate the Sequence Number field for products and promotions in the Catalog. Then make an API call similar to the following: