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 to access data from JSON offer through a HMTL offer?

Avatar

Avatar
Validate 1
Level 3
Jennifer_Huynh
Level 3

Likes

17 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
Jennifer_Huynh
Level 3

Likes

17 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Jennifer_Huynh
Level 3

18-01-2019

I created one activity with two offers.  One is Json Data Offer and another one in HTML type of offer.

In my Json offer i stored 

{

    "_id": "5a65d24d8fafc966921e9169",

    "index": 0,

    "guid": "7c006504-c6f7-468d-a46f-f72531ea454c",

    "isActive": true,

    "balance": "$2,075.06",

    "picture": "http://placehold.it/32x32",

    "greeting": "Hello, Stephenson Fernandez! You have 4 unread messages.",

    "favoriteFruit": "strawberry"

}

In my html offer.  I stored

<script>

alert("hi")

debugger;

adobe.target.getOffer({ 

  "mbox": "target-global-mbox",

  "params": {},

  "success": function(offer) {    

       console.log(offer[0].content[0].greeting);

  }, 

  "error": function(status, error) {         

      console.log('Error', status, error);

  }

});

</script>

I follow the steps here but it won't work   Create JSON offers https://marketing.adobe.com/resources/help/en_US/target/target/c_create_json_offer.html

Accepted Solutions (0)

Answers (0)