Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!

How to access data from JSON offer through a HMTL offer?

Avatar

Level 3

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

1 Reply

Avatar

Level 1

Hey there,
running into the same issue so I'll bump up the thread.