ACC V8 Sync External content to ACC | Community
Skip to main content
Level 2
May 6, 2024
Solved

ACC V8 Sync External content to ACC

  • May 6, 2024
  • 1 reply
  • 881 views

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.

 

 

 

@johnwi12 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manoj_Kumar

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 }

1 reply

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
May 7, 2024

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  | https://themartech.pro
jomyjoseAuthor
Level 2
May 8, 2024

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? 

Manoj_Kumar
Community Advisor
Community Advisor
May 9, 2024

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  | https://themartech.pro