Expand my Community achievements bar.

Unable to utilize bulk update api in Adobe Target to add custom profile attributes. Attributes not recognized.

Avatar

Level 2

Hi all,

I'm new to Target. My goal is to ensure that we can provide personalization for users when they log on to one of our pages. 

In order to do that, we're adding profile attributes using the pcId (tntId) via the Target Bulk Update API in the link below by adding them into a file and then using curl to push it to the Target endpoint for our client code.

 

https://experienceleague.adobe.com/docs/target-dev/developer/api/profile-apis/profile-bulk-api.html?...

 

We are not able to pull the values for each parameter specified in the file for use in a defined Target Audience.

For example, in my case, the contents of my file is very simple.

batch=pcId,primaryRole,personna,hasAuth
c0be691c46574646946c0972ddbb3f36,Senior Engineer,Architect,Yes
45f0b9533b474ee68e5256010db0b5e8,Senior Engineer,Architect,Yes

There are two pcIds and 3 profile attributes; primaryRole, personna and hasAuth.

When I run the curl command, I get the output indicating a successful export into Target.

<response><success>true</success><batchStatus>http://mboxedge44.tt.omtrdc.net/m2/xxxxprofile/batchStatus?batchId=xxxx-1702421749846-98858546</batc...submitted for processing</message></response>

In the Target UI, we set up an activity and an experience for a specific web page.
We then create profile attributes for the primaryRole, personna and hasAuth profile parameters.

In the profile Scripts, we can set up each of these parameters as follows in 3 different scripts; one for each parameter.

return user.get('primaryRole');
return user.get('personna');
return user.get('hasAuth');

All 3 parameters are found by the suggestions provided when setting up the scripts.

After activating the scripts, we then create an audience (or use an existing one) and try to see if we can use them in the Audience by using a Visitor Profile container and choose user.<script> for one of the attributes say 'primaryRole'. We use an action of 'Parameter is present' and click on Done to register and save the Audience.

However we do not get the desired experience (here we are simply highlighting some text on the web page) for the page configured in the activity. This is true for *any* of the profile parameters that we specify in the bulk update file that we used above. We can see them in the Visitor Profile drop down in the specified Audience as if they are recognized by Adobe Target but we cannot validate them if they are present in the Audience nor can we get the values that we set in the file used in the bulk update export for the profiles in question,

Our pcId's are recognized and we can get the experience if we simply match the Visitor Profile on the pcId attribute solely by itself, but we cannot match any profile attributes that were specified using the bulk update nor can we validate that any of these attributes are present. Note that we *do* get the experience on the web page if we configure the Audience for any of the parameters to 'Parameter is not present'.

 

If I query the Target Profile API using the tntId for the pcId's used in the file for the Bulk export, I can get all the profile attributes returned for that profile but I do not get the profile parameters I specified in the bulk update file ('primaryRole', 'personna' etc).

 

I'm thinking that I did not configure something properly here or am missing something that is very simple but I've put in a lot of time debugging this and haven't gotten anywhere.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

9 Replies

Avatar

Community Advisor

Hi @Arkster  - first of all, you did well in your first attempt and all the best for your personalisation goals in new year!

A few tips + steps:

1. Test data is uploaded successfully: Your batch-file seems correctly formatted. As a quick check, I'd recommend testing whether the user-profile for one of the PC-ids is updated successfully. You can use the URL provided in the article below:

https://experienceleague.adobe.com/docs/target-dev/developer/api/profile-apis/profile-fetch.html?lan...

 

https://<your-client-code>.tt.omtrdc.net/rest/v1/profiles/your-tnt-id?client=<your-client-code>

 

2. Use the profile attributes in audiences: If you get all the attributes with expected values then you are moving in right direction. Uploaded attributes can now be used to configure audiences directly. Looking at your profile scripts, you are simply trying to retrieve the values of  profile attributes. You need not use profile-scripts unless you want to process on profile-attributes such as do some calculations.  Here's an audience-definition using hasAuth attribute. 

Rajneesh_Gautam__0-1702842097024.png

 

3. Using profile attributes in profile-scripts: If you are want to process profile attributes in profile scripts, these can be accessed using profile.<attribute-name>. You are using user.<attribute-name> which is not correct. 

 

One last point - updates to user-profiles across edge-network may take some time before you see the changes to your experiences. 

 

Hope this helps

 

Regards

Rajneesh

 

Avatar

Level 2

Hello Rajneesh. Thank you for taking the time out to reply. I was indeed skeptical about creating a profile script for attributes that did not need any custom parsing. 
I however still cannot see the 'hasAuth' parameter in my curl call which I used to query using the tntId.
Here is a full list of the parameters returned back using the call.

curl -X GET --header 'Authorization: Bearer xxxxx514-911f-ab7dcecxxxxx4' https://xxxxx.tt.omtrdc.net/rest/v1/profiles/85e6f1fcbb6f419dba7aabbb0991c016.34_0?client=xxxxx | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2622    0  2622    0     0   7667      0 --:--:-- --:--:-- --:--:--  7689
{
   "client" : "xxxxxxx",
   "modifiedAt" : "2023-12-18T11:33:44.000-05:00",
   "profileAttributes" : {
      "firstSessionStart" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "1701289924194"
      },
      "migrationCounts" : {
         "modifiedAt" : "2023-12-18T11:33:44.000-05:00",
         "value" : "44:10:1702917224229,45:9:1702917221256"
      },
      "user.1036240.lastSessionId" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "162e7df99c074f7fa4d4ec1db3f517cd"
      },
      "user.40_60_group_split" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "group60"
      },
      "user.57644174.cart_visitor" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "0.0"
      },
      "user.57644174.currentSessionId" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "162e7df99c074f7fa4d4ec1db3f517cd"
      },
      "user.DPEOPT_1308" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "0"
      },
      "user.ME_Global_Campaign_Conversion" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00"
      },
      "user.RandomNumbers" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "16"
      },
      "user.akn_notfound" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "false"
      },
      "user.xxxxxxxEngineer" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "False"
      },
      "user.categoryAffinity" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "CategoryAffinity[visitedEnvironments=[],categoryAffinities={}]"
      },
      "user.excludeIPs" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "true"
      },
      "user.locationCity" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "portola valley"
      },
      "user.locationCountry" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "united states"
      },
      "user.locationDMA" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "san francisco-oak-san jose"
      },
      "user.locationState" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "california"
      },
      "user.locationZip" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "94028"
      },
      "user.mboxMCSDID" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "56EA10DCF116765A-1EE98A9EB15F1BB4"
      },
      "user.myCompany" : {
         "modifiedAt" : "2023-12-17T22:42:47.000-05:00",
         "value" : "Google"
      },
      "user.pcId" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "85e6f1fcbb6f419dba7aabbb0991c016"
      },
      "user.percent" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "24"
      },
      "user.personna" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00"
      },
      "user.sessionCount" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "26"
      },
      "user.twoGroup" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "group1"
      },
      "user.visitor_type" : {
         "modifiedAt" : "2023-12-18T11:33:41.000-05:00",
         "value" : "acad"
      }
   },
   "visitorId" : "19057861841053895897735102320009695687"
}

  

I can validate that my visitorId is shown correctly. Note that I also do not see the 'personna' attribute populated with 'Architect' that I had provided in the batch update using the profile update api.

I removed the user attributes mappings in my audience and now have the 'hasAuth' set up similar to how you indicated (see screenshot). This did not work where I did not get the experience (likely as expected since the query did not show the attribute).
I'm not really sure why I'm not able to get the experience even though it had been a few days since I had run the batch update using the API call. I just ran it again but so far I do not see any changes.

Do you happen to know how long the updates can take to propagate to the edge servers? If I remember correctly, the documentation indicates up til 1 day but I do not see the attributes updated in the api call.


 

Avatar

Community Advisor

hi @Arkster  - ahh so looks like an issue with the file itself. Can you confirm that the format of the batch-file is UTF-8? All the further steps will work once you see the profile getting updated correctly with uploaded profile attributes.

 

Regards

Rajneesh

 

Avatar

Level 2

Hi Rajneesh, I wasn't saving the file.txt in utf-8 but as a test, I saved the file in utf-8 encoding and submitted it again using curl. So far I have not seen any difference. I am not able to get a value for 'hasAuth' yet. I'm checking the attribute in Visitor Profile using 'Parameter value is present' and I'm not able to view the experience when I visit the test page.

I wonder if this will take some time to update across the edge network but it's not working as I thought it would be yet.

Avatar

Community Advisor

@Arkster  - so you do not see any of the uploaded attributes when you test using the URL as given below?

 

https://<your-client-code>.tt.omtrdc.net/rest/v1/profiles/your-tnt-id?client=<your-client-code>

 

Avatar

Level 2

Hi @Rajneesh_Gautam_ , yes. That's exactly what I mean. When I query using my tntId, I do not see the attributes in the profile.

This is what I see when I run the curl.

ADSKML7VN2CY3J:Desktop khanah$ curl -X GET --header 'Authorization: Bearer 70e51cd4-7e68-4514-911f-ab7dcxxxxxx4' https://xxxxxxxx.tt.omtrdc.net/rest/v1/profiles/85e6f1fcbb6f419dba7aabbb0991c016.34_0?client=xxxxxxxx | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2709    0  2709    0     0  13322      0 --:--:-- --:--:-- --:--:-- 13279
{
   "client" : "xxxxxxxx",
   "modifiedAt" : "2023-12-18T16:50:47.000-05:00",
   "profileAttributes" : {
      "firstSessionStart" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "1701289924194"
      },
      "migrationCounts" : {
         "modifiedAt" : "2023-12-18T16:43:05.000-05:00",
         "value" : "44:13:1702935785587,45:12:1702935782812"
      },
      "user.1036240.lastSessionId" : {
         "modifiedAt" : "2023-12-18T16:43:02.000-05:00",
         "value" : "eafe3dd2141247a7a028c15286abb962"
      },
      "user.40_60_group_split" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "group60"
      },
      "user.57644174.cart_visitor" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "0.0"
      },
      "user.57644174.currentSessionId" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "eafe3dd2141247a7a028c15286abb962"
      },
      "user.DPEOPT_1308" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "0"
      },
      "user.ME_Global_Campaign_Conversion" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00"
      },
      "user.RandomNumbers" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "49"
      },
      "user.akn_notfound" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "false"
      },
      "user.xxxxxxxxEngineer" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "False"
      },
      "user.categoryAffinity" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "CategoryAffinity[visitedEnvironments=[],categoryAffinities={}]"
      },
      "user.excludeIPs" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "true"
      },
      "user.locationCity" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "portola valley"
      },
      "user.locationCountry" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "united states"
      },
      "user.locationDMA" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "san francisco-oak-san jose"
      },
      "user.locationState" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "california"
      },
      "user.locationZip" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "94028"
      },
      "user.mboxMCSDID" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "40D3C2AC01D68ACA-7446792F8501EFFE"
      },
      "user.myCompany" : {
         "modifiedAt" : "2023-12-17T22:42:47.000-05:00",
         "value" : "Google"
      },
      "user.pcId" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "85e6f1fcbb6f419dba7aabbb0991c016"
      },
      "user.percent" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "43"
      },
      "user.personna" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00"
      },
      "user.primaryRole" : {
         "modifiedAt" : "2023-12-13T19:54:00.000-05:00",
         "value" : "Engineer"
      },
      "user.primaryRoleA" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "Engineer"
      },
      "user.sessionCount" : {
         "modifiedAt" : "2023-12-18T16:43:02.000-05:00",
         "value" : "29"
      },
      "user.twoGroup" : {
         "modifiedAt" : "2023-11-29T15:32:04.000-05:00",
         "value" : "group1"
      },
      "user.visitor_type" : {
         "modifiedAt" : "2023-12-18T16:48:22.000-05:00",
         "value" : "acad"
      }
   },
   "visitorId" : "19057861841053895897735102320009695687"
}

Avatar

Community Advisor

@Arkster Possible to share the file you are trying to upload? You may DM me

Avatar

Level 2

Hi @Rajneesh_Gautam_ , I've sent you a dm with the file contents. I did not attach the file itself but if you need it, I can do so.

Avatar

Level 2

Hi Rajneesh,

For some reason, I am unable to send more dm's as it's saying that I sent too many and I have to wait.

In any case, I can see that when after running the bulk update, the columns are visible via the curl command. However strangely, the attributes that were published in the curl command that were in the file go away and they get replaced by the user attributes after a minute. When I run the curl again, I get the following. Note I'm not able to get the experience on the web page. I'm not sure why this is happening as it is very strange.

 

 

curl -X GET --header 'Authorization: Bearer 70e51cd4-7e68-4514-911f-xxxxx014c4'  https://xxxxxxx.tt.omtrdc.net/rest/v1/profiles/85e6f1fcbb6f419dba7aabbb0991c016?client=xxxxxxx | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2697    0  2697    0     0   6345      0 --:--:-- --:--:-- --:--:--  6360
{
   "client" : "xxxxxxx",
   "modifiedAt" : "2023-12-18T18:29:05.844-05:00",
   "profileAttributes" : {
      "firstSessionStart" : {
         "modifiedAt" : "2023-11-29T15:32:04.194-05:00",
         "value" : "1701289924194"
      },
      "migrationCounts" : {
         "modifiedAt" : "2023-12-18T18:24:03.810-05:00",
         "value" : "44:14:1702941843810,45:13:1702938403144"
      },
      "user.1036240.lastSessionId" : {
         "modifiedAt" : "2023-12-18T18:23:56.853-05:00",
         "value" : "49335fd7af55420fa6f467165edcba4b"
      },
      "user.40_60_group_split" : {
         "modifiedAt" : "2023-11-29T15:32:04.195-05:00",
         "value" : "group60"
      },
      "user.57644174.cart_visitor" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "0.0"
      },
      "user.57644174.currentSessionId" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "49335fd7af55420fa6f467165edcba4b"
      },
      "user.DPEOPT_1308" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "0"
      },
      "user.ME_Global_Campaign_Conversion" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00"
      },
      "user.RandomNumbers" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "83"
      },
      "user.akn_notfound" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "false"
      },
      "user.xxxxxxxEngineer" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "False"
      },
      "user.categoryAffinity" : {
         "modifiedAt" : "2023-11-29T15:32:04.200-05:00",
         "value" : "CategoryAffinity[visitedEnvironments=[],categoryAffinities={}]"
      },
      "user.excludeIPs" : {
         "modifiedAt" : "2023-12-18T18:24:07.315-05:00",
         "value" : "true"
      },
      "user.locationCity" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "boston"
      },
      "user.locationCountry" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "united states"
      },
      "user.locationDMA" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "boston (manchester)"
      },
      "user.locationState" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "massachusetts"
      },
      "user.locationZip" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "02210"
      },
      "user.mboxMCSDID" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "3712B011EFDB3A45-60CE48E467B89B1E"
      },
      "user.myCompany" : {
         "modifiedAt" : "2023-12-17T22:42:47.691-05:00",
         "value" : "Google"
      },
      "user.pcId" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "85e6f1fcbb6f419dba7aabbb0991c016"
      },
      "user.percent" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "11"
      },
      "user.personna" : {
         "modifiedAt" : "2023-12-18T18:24:07.315-05:00"
      },
      "user.primaryRole" : {
         "modifiedAt" : "2023-12-13T19:54:00.444-05:00",
         "value" : "Engineer"
      },
      "user.primaryRoleA" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "Engineer"
      },
      "user.sessionCount" : {
         "modifiedAt" : "2023-12-18T18:23:56.853-05:00",
         "value" : "31"
      },
      "user.twoGroup" : {
         "modifiedAt" : "2023-11-29T15:32:04.194-05:00",
         "value" : "group1"
      },
      "user.visitor_type" : {
         "modifiedAt" : "2023-12-18T18:24:07.314-05:00",
         "value" : "acad"
      }
   },
   "visitorId" : "19057861841053895897735102320009695687"
}