Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

ACC V8 Sync External content to ACC

Avatar

Level 2

I've a requirement to sync values from JSON API into ACC. The Json contains key with value pairs. I want to sync this periodically. how do I go about it?

 

i'm thinking once i've the key value pair in ACC, i can use personlization blocks to pick up the key value pair into email at the time of delivery.

 

 

 

@johnwwilcoxmba 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @jomyjose 

 

You can do something like this

 

JSON Response from API

var apiResponse=[{
"key1":"value1"
},{
"key2":"value2"
}]

var parsedContent=JSON.parse(apiResponse);

foreach(var r in parsedContent){

// write in database with xtk.session.Write
}

     Manoj
     Find me on LinkedIn

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @jomyjose 

 

You can do something like this

 

JSON Response from API

var apiResponse=[{
"key1":"value1"
},{
"key2":"value2"
}]

var parsedContent=JSON.parse(apiResponse);

foreach(var r in parsedContent){

// write in database with xtk.session.Write
}

     Manoj
     Find me on LinkedIn

Avatar

Level 2

thank you @Manoj_Kumar_ . 

 

can you give direction code snippet to use the keys in email so it can pull up the respective value in email while sending? 

Avatar

Community Advisor

Hello @jomyjose 

 

You won't be able to do this on runtime on personalization block or in delivery content. 

You will have to prepare this in a WF before and then pass on this information to delivery.


     Manoj
     Find me on LinkedIn