on ‎2021 Sep 06 11:10 AM
Hi,
We need to find a way to search Offers via the available API's which are in the Active state
This is available on the UI, in the Offer App, see below image:
Seemingly none of the API's cater for this 'Active' flag
Note: this is not purely a Status (Internal or External), it seems to be based on specific criteria of the Offer. Such as dates of validity, status and content availability
Filtering using dates only gets very tricky, we have hundreds of thousands of available offers which start and end on different dates
Anyone know exactly what the "Active" on the UI calls to get those offers?
Or better yet, how to get Active only Offers via the APIs?
Thanks!
Request clarification before answering.
Hi,
You can use following URL to get the "active" offers as of today:
https://<SMC_HOST>:<PORT>/sap/opu/odata/sap/API_MKT_OFFER_SRV/Offers?$top=100&$inlinecount=allpages&... eq '01' and OfferEndDateTime ge datetimeoffset'2021-09-06T00:00:00.0000000Z'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Almost all the APIs in SMC would need $top param to avoid any performance-related timeout issues. In general, SMC follows OData V2 protocol therefore you can refer to http://www.odata.org/documentation/odata-version-2-0/uri-conventions/ to understand how to use various params in APIs. Specifically for paging, you can use $top & $skip.
Following URL will give you OfferContentUUID in a single call for all the active offers.
https://<SMC_Host>:<SMC_Port>/sap/opu/odata/sap/API_MKT_OFFER_SRV/Offers?$top=1000&$inlinecount=allp... eq '01' and OfferEndDateTime ge datetimeoffset'2021-09-04T00:00:00.0000000Z'&$expand=OfferContents&$select=OfferContents/MarketingOfferContentUUID
Thanks Saurabh,
There is however still a difference. The Is_Active flag seems to consider more than simply the date and status
As an example, using the dates on the UI returns roughly 13500 offers. Then selecting Active = 8500
As you can see, there is a material difference and we are using this to build recommendation models. So any data saving makes a massive difference
I'm going to do VLOOKUPS on the extracted data to see if I can find the differences in the data. There is nothing documented on the Active button and exactly what it considers data wise
Cheers
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.