Context Dimensions API
The Context Dimensions API generates a list of cacheable and active context dimension codes and their values for caching. These dimensions and values are associated with rule sets attached to the catalog offers.
This API does not require anything from the previous API response. The list is ordered and is guaranteed to return the same order on every run as long as dimensions are not added or removed from the catalog.
If a context dimension associated with a catalog offer is not cacheable, it does not appear in the response. If a cacheable context dimension is not associated with a catalog offer, it does not appear in the response.
The Context Dimensions API call is required regardless of whether you have any rule sets linked to your catalog because the output of this API is internally required by subsequent APIs.
/services/apexrest/{namespace}/v3/admin/catalogs/{catalogCode}/contextdimensions
GET
If you specify just one of these two parameters, it follows the behavior described in the table below and accepts your defined time for the parameter you specified. If you are using one or both parameters, you must specify them with the same values for all of the Populate Cache APIs in this sequence.
Parameter | Example | Default | Optional/Required | Notes |
---|---|---|---|---|
effectiveStartTime | 2001-07-04T12:08:56 | Current date and time | Optional | effectiveStartTime is the time that you want your cached catalog entries to be effective. It should be in the UTC date-time format. Your effectiveStartTime must occur after the current time for which you are executing the Populate Cache APIs or you will receive an error message. |
expirationTime | 2001-07-04T12:08:56 | effectiveStartTime + TimeToLive | Optional | expirationTime is the time that you want your cached catalog entries to expire. It should also be in the UTC date-time format. Your expirationTime must occur after your effectiveStartTime or you receive an error message. TimeToLive is a custom setting created in CPQ Configuration Setup. It has a default value of 30 days. |
Here is an example of how to pass the URI parameters:
This is an example of how you invoke the API using Apex:
This API can be run in parallel for multiple catalogs. For example, if you have 100 catalogs (Catalog1, Catalog2..Catalog 100), you can run the API for all 100 catalogs in 100 parallel threads.
Header | Description |
---|---|
Content-Type | application/json |
This example shows a list of maps having dimension code and values marked for caching.
The response body contains the following:
-
DIMENSION1, DIMENSION2, DIMENSION3, etc. are sorted in an arbitrary order. There is no need to specify these in EPC.
-
DIMENSION1, DIMENSION2, DIMENSION3, etc. are extracted from all the rules of the products in the catalog, for example, only the relevant dimensions.
Code | Description |
---|---|
200 | OK |
500 | Internal Server Error |