since ‎04-06-2019
‎03-03-2021
xiaog92197055
Level 1
Re: how to return json response with adobe.target.getOffer
Avatar

xiaog92197055

xiaog92197055
- Adobe Target
I had completed all the steps you mentioned and don't see json response. Don't I need to setJson somewhere in getoffer? do you see json response returned? if yes, can you share sample code?

Views

409

Likes

0

Replies

0
Re: how to return json response with adobe.target.getOffer
Avatar

xiaog92197055

xiaog92197055
- Adobe Target
What I learned from the following link is I need to setJson action. Do you happen do know where to add it? https://docs.adobe.com/content/help/en/target/using/experiences/offers/create-json-offer.html

Views

422

Likes

0

Replies

0
Re: how to return json response with adobe.target.getOffer
Avatar

xiaog92197055

xiaog92197055
- Adobe Target
actually console.log(offer) doesn't print offer in console. but alert(offer) works. Replace the mbox name in my code with mbox you use. you will see the alert pop up. I don't see an option here to upload screenshot.

Views

424

Likes

0

Replies

0
how to return json response with adobe.target.getOffer
Avatar

xiaog92197055

xiaog92197055
- Adobe Target
I created a json type offer and want target to return that. However, when I try the following code, response is blank. I couldn’t find any code example on adobe website specifically about return json response. Can you double check whether I missed something below or if you can point me to a code example/documentation with json response call? By the way, the following way works fine if it is html offer. adobe.target.getOffer({ "mbox": "mboxname", "params": { "profile.language": "en" }, "success":...

Views

468

Likes

0

Replies

8
Likes given to