Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How do I retrieve content using applyOffers()?

Avatar

Avatar
Validate 1
Level 1
dan_e1982
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
dan_e1982
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
dan_e1982
Level 1

20-04-2021

Hi

I have a secure SPA that we're implementing Target into.  We've decided to utilise the new getOffers() and applyOffers() functions that were part of at.js 2x.

Via a Launch rule we have managed to successfully 'get' the offers, i.e., see the offers associated with the mbox in the response, this is code we've used to do this..

dan_e1982_0-1618984850574.png

However, I've been unable to figure out how to apply any of these offers, the Adobe documentation is a bit sparse, giving no example of how to retrieve the content associated with the mbox, I've attempted the below, which haven't retrieved anything:

 

dan_e1982_1-1618985227080.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Is anybody able to give me any pointers, or examples of the correct syntax I should be using?

Many thanks

Dan

View Entire Topic

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

23-04-2021

Hello,

Is there any specific reason you are trying to execute applyOffer separately?? because ideally it should be working with getOffer after receiving the response. I hope you must have referred https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementati... or https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementati... 

 

based on at.js (1.x or 2.x) respectively.

 

and if you are using mbox.js then i think applyOffer doesn't supported there, refer - https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/mbox-implement/mbo...