Expand my Community achievements bar.

Join us for our second AMA on experimentation and personalization strategies with Target, occurring on June 3rd!

Cannot update global mbox profileAttributes via Delivery API

Avatar

Level 1

Hi everyone

i cant update global mbox profileAttributes via delivery API. When i am fetching global mbox profile attributes after update request they are not updated.

Could you please verify if i am constructing my requests correctly. I double checked tntId and client, they are the same for both update and GET request 

Thank you

 

update profileParameters request:

 

POST

const url = `https://{client}.tt.omtrdc.net/rest/v1/delivery?client={client}&sessionId=${sessionId}`;
const body = {
id: {
tntId: tntId,
},
context: {
channel: 'web',
},
execute: {
pageLoad: {
profileParameters: { test: 'test' },
},
},
};
 
await fetch(url, {
method: 'POST',
body: JSON.stringify(body),
});
 
POST request returns status 200 with empty response body
 
fetch updated profile:
GET
fetch(
`https://{client}.tt.omtrdc.net/rest/v1/profiles/${tntId}?client={client}`
);
 
i am expecting to get profileAttributes.test = 'test' in the response, however the value that i am getting is the old one
 
update:
the session id that i am using for POST request is coming from mbox cookie which contains current session information. I also send tntId in payload id section. That same tndId is later on used for the GET request. GET response contains a visitorId which is different from tntId and sessionId. As an experiment i've tried to use visitorId that is returned from profile api for delivery api update request as a session id query param (instead of current sessionId from mbox cookie). It appears that i can add new profileParameters this way (but not update existing ones) and it only works if i will manually delete existing cookie from the browser storage, so i assume that new params are getting applied when a new session gets issued. This is very weird since this functionality worked for profileParameters updates before with the sessionId from the mbox cookie, and even with this workaround i am not able to update existing params
 
could someone please confirm or deny my assumption
 
0 Replies