API to get Included, excluded and discount at promotion level #433
Replies: 8 comments
-
Hi Team, Can someone please let me know on this. |
Beta Was this translation helpful? Give feedback.
-
You can probably do a search by promotion ID and pass the result in the feed. |
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't understand. Search by promotion ID will give you an object of promotion only. Which is itself similar to what has been done so far. I need Included, excluded products we use to setup in promotion rule while creating the promotion, in the feed. |
Beta Was this translation helpful? Give feedback.
-
HI Pawan
for getting included products you can try following code .
*var productSearchModel = new ProductSearchModel();*
*productSearchModel.setPromotionID(promotion.ID);*
*productSearchModel.setPromotionProductType(dw.catalog.ProductSearchModel.PROMOTION_PRODUCT_TYPE_QUALIFYING);*
*productSearchModel.search();*
*var iterator = productSearchModel.getProductSearchHits();*
but for getting excluded items i don't think you have any API.
…On Tue, Jul 16, 2019 at 6:39 PM Pawan Kumar ***@***.***> wrote:
Sorry I didn't understand. Search by promotion ID will give you an object
of promotion only. Which is itself similar to what has been done so far. I
need Included, excluded products we use to setup in promotion rule while
creating the promotion, in the feed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/84/comments/3?email_source=notifications&email_token=ADMLMXZYOHIDXPMTWKPCKPLP7WPBTA5CNFSM4IDVX4L2YY3PNVWWK3TUL52HS4DFWNCGS43DOVZXG2LPNZIG643UKJSXA3DZVJRW63LNMVXHIX3JMTHAAAQKHE>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADMLMX6DQWL7H55VLB57S5TP7WPBTANCNFSM4IDVX4LQ>
.
--
Regards
*Nimit Shukla*
T: +65 84575208
|
Beta Was this translation helpful? Give feedback.
-
Hi Nimit, Thanks for your reply. So this way we would be able to get the products applicable for the specific promotion. |
Beta Was this translation helpful? Give feedback.
-
Hi Pawan
you can not fetch promotion rule using API.
see the following explanation written in documentation.
The Promotion class provides access to the basic attributes of the
promotion such
as name, callout message, and description, but the details of the
promotion rules
are not available in the API due to their complexity.
A Promotion represents a specific instance of a promotion rule assigned to
a container. Promotion rules themselves that are not assigned to any
container are inaccessible through the API.
…On Wed, Jul 17, 2019 at 2:24 AM Pawan Kumar ***@***.***> wrote:
Hi Nimit,
Thanks for your reply. So this way we would be able to get the products
applicable for the specific promotion.
I agreed with the solution provided above will give me the list of
products which may be 10K or more, but it would be difficult for me to
write in a PSV file which in turn SFMC need to ingest that in one of the DE
column and size may get exceeded.
Do we have any capability to get the product inclusion in term of what is
getting included like if promotion is getting applied on a category, or a
department number say AB123, can we get the inclusion or exclusion in term
of which category or what department number is getting included or excluded.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/84/comments/5?email_source=notifications&email_token=ADMLMX355CLBMZRO6I74DJLP7YBOZA5CNFSM4IDVX4L2YY3PNVWWK3TUL52HS4DFWNCGS43DOVZXG2LPNZIG643UKJSXA3DZVJRW63LNMVXHIX3JMTHAAAQKUY>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADMLMX6PZYEZQRMCB3LMT7DP7YBOZANCNFSM4IDVX4LQ>
.
--
Regards
*Nimit Shukla*
T: +65 84575208
|
Beta Was this translation helpful? Give feedback.
-
Thanks Nimit for the reply. I could see certainly different outcome in different scenarios to get inclusion product at promotion level using above approach.
Only thing i have identified is above solution is only working for either categories or products directly and not on any criteria created using any custom attribute and that too not in combination. It would be really great if you could share your thoughts on above discrepancy and let me know in case you need any further information from my end. |
Beta Was this translation helpful? Give feedback.
-
Hi Nimit, Do you have any update on this please. |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
As per the requirement we need to pass promotion feed to SFMC which I could see is OOTB feature in connector cartridge which is taking promotion object by PromotionMgr.getPromotions() API method. I need to pass Included, excluded products along with discount in the same feed which is a part of Promotion Rule but I couldn't find any API which will provide this information. Can you please let me know which API could provide the same.
Beta Was this translation helpful? Give feedback.
All reactions