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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 1st edition of the Target Community Lens newsletter is out now! Click to the right to find all the latest updates
SOLVED

profile update (via the Server-Side Delivery API)

Avatar

Level 3

I'm reading target docs about server side integrating with 3rd party data sources and there are some limitations and there is mention that i should integrate though adobe.io to pass them but then on adobe.io docs I see same description about profile update with same limitations and link to "Server-Side Delivery API" which is top of same documentation. Where I can find real documentation where single updates will be processed faster than 1-24h?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi @broman__pl  - documentation can be found here: https://developers.adobetarget.com/api/delivery-api/#section/Getting-Started 

hope this helps,

 

Regards

Rajneesh

1 Reply

Avatar

Community Advisor

hi @broman__pl  - If you use single-profile update API then the delay will remain same regardless the implementation approach. To make profile-updates much faster, solution is Server side delivery API as you mentioned. Server-side API implementation requires:

1. An execution environment which can make calls to API - there are SDKs for Java and NodeJS though you may use any other languages
2. Way to get Experience Cloud ID or PCID - the easiest way is to pass these from client-side to execution environment

3. Generate the session-id: You can either pass the session-id from client-side or generate your own following these guidelines: 
4. Pass user data as mbox call - here's a code sample below:

5. In Adobe Target - you can use Profile Scripts to read the parameters and use in Audiences as per your use-cases. 

var targetURL = 'https://<your-client-code>.tt.omtrdc.net/rest/v1/delivery?client=<your-client-code>&sessionId='+<session-id>;

var targetData = {
"context":{
"channel":"web"
},
"id": {
"marketingCloudVisitorId": <ECID>,
"tntId": <PCID>
},
"experienceCloud" : {
"analytics": {
"logging": "client_side"
}
},
"execute": {
"mboxes" : [
{
"name" : "<mbox-name>",
"index" : 1,
"parameters": {"param1":"value1"}
}
]
}
}

let targetHeaders = new Headers();
targetHeaders.append('Content-Type','application/json');

let targetRequest = new Request(targetURL, {
method: 'POST',
headers: targetHeaders,
mode: 'cors',
cache: 'default',
body: JSON.stringify(targetData)
});

fetch(targetRequest)
.then(response => {
if (!response.ok) {
throw new Error(`Network response was not ok. Status code: ${JSON.stringify(response)}.`);
}
return response.json();
})
.then(data => yourFunctionToProcessTargetResponse(data))
.catch(error => console.log("Error:" + error.message));
}

Avatar

Level 3

Hi @Rajneesh_Gautam_ but where I can find documentation about this Server-side API? IN two places I see same details

1 https://experienceleague.adobe.com/docs/target/using/implement-target/before-implement/methods/singl...

2 http://developers.adobetarget.com/api/#updating-profiles

On second page there is mention about server side with link but it just points to top of this page 😞

 

Avatar

Correct answer by
Community Advisor

hi @broman__pl  - documentation can be found here: https://developers.adobetarget.com/api/delivery-api/#section/Getting-Started 

hope this helps,

 

Regards

Rajneesh