Expand my Community achievements bar.

Applications for the 2024 Adobe Target Community Mentorship Program are open! Click to the right to learn more about participating as either an Aspirant, to professionally level up with a new Certification, or as a Mentor, to share your Adobe Target expertise and inspire through your leadership! Submit your application today.
SOLVED

Targetting with a custom user attribute with Audiences imported via API

Avatar

Level 2

How can we target for an audience created via API , lets say I have a third party service which is sending segment/audience definitions – target has APIs so one can create audiences via that.
Now, on the site page – when user logs in – I can make a call to a third party to fetch some user attribute (lets say a flag which says user is premiere user).
Now can we send this flag to target and make Target resolve the audience to the one created via API?

1 Accepted Solution

Avatar

Correct answer by
Level 6

@josejr19  Thanks for elaborate response. Only one question - how is imported audience resolved when page is visited....just because premiereUser=true is used while defining audience , target will be able to map it to that audience when a page visit triggers a param premierUser = true to be sent via page params? is that correct understanding? Again thanks in advance.

 

@asn_india When you say " how is imported audience resolved when page is visited" I am assuming you mean that you will be uploading user data via the adobe target profile API, is that correct? If so you need to make sure you implement the adobe target mbox3rdPartyId(which you can think of as your companies internal id for the user) to sync the user with the profile you uploaded via the api. You can also use the TNT ID. When the sync happens Target will then pull these users profile from the edge cluster to use in decisioning based on the ID you pass, either the mbox3rdPartyId or the TNT ID. Link below for Adobes documentation.

 

Hopefully this makes sense and you can validate using the documentation below.

 

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/3rd-party-id.html?la...

https://developers.adobetarget.com/api/#profiles

 

 

View solution in original post

3 Replies

Avatar

Level 6

@asn_india 

To confirm the use case -

  • We want to create the audience in Adobe Target using the Audience API, this is the key value pair, i.e premierUser = true, correct?
  • We want to use this audience as a segment in an experience in Target.
  • At run time, when user visits the site and we call the third party service to obtain this flag value, we want to pass it to Target so that it can decide if to show the experience to the user. i.e if premierUser=true then user will qualify for Adobe Target experience with special offer.

 

If this is the case, then you have multiple functions available to pass in the key value pair as a parameter. 

 

If we can get the flag prior to the global mbox being called, remember this will be picked up with the global mbox call automatically, the data would go under params;

targetPageParams = function() { 
  return { 
    "a": 1, 
    "premierUser": "true", 
    "profile": { 
        "age": 26, 
        "country": { 
          "city": "San Francisco" 
        } 
      } 
  }; 
};

 

If the data is not available in a timely manner or before the global mbox call then recommend making a custom mbox call using getOffer() & applyOffer(). We would want to pass in the value in the getOffer() function. The key value pair from the third party service would go under params;

adobe.target.getOffer({   
  "mbox": "target-global-mbox", 
  "params": { 
     "a": 1, 
     "b": 2, 
     "premierUser": "true", 
     "profile.gender": "male" 
  }, 
  "success": function(offer) {           
        adobe.target.applyOffer( {  
           "mbox": "target-global-mbox", 
           "offer": offer  
        } ); 
  },   
  "error": function(status, error) {           
      console.log('Error', status, error); 
  } 
});

 

 

Here is a good article on using data providers which is also a option but means we hold up calling Target until we get a response from the data provider.

https://experienceleague.adobe.com/docs/target-learn/tutorials/integrations/use-data-providers-to-in...

 

Hope this helps!

Avatar

Level 2
@josejr19 Thanks for elaborate response. Only one question - how is imported audience resolved when page is visited....just because premiereUser=true is used while defining audience , target will be able to map it to that audience when a page visit triggeres a param premierUser = true to be sent via page params? is that correct understanding? Again thanks in advance.

Avatar

Correct answer by
Level 6

@josejr19  Thanks for elaborate response. Only one question - how is imported audience resolved when page is visited....just because premiereUser=true is used while defining audience , target will be able to map it to that audience when a page visit triggers a param premierUser = true to be sent via page params? is that correct understanding? Again thanks in advance.

 

@asn_india When you say " how is imported audience resolved when page is visited" I am assuming you mean that you will be uploading user data via the adobe target profile API, is that correct? If so you need to make sure you implement the adobe target mbox3rdPartyId(which you can think of as your companies internal id for the user) to sync the user with the profile you uploaded via the api. You can also use the TNT ID. When the sync happens Target will then pull these users profile from the edge cluster to use in decisioning based on the ID you pass, either the mbox3rdPartyId or the TNT ID. Link below for Adobes documentation.

 

Hopefully this makes sense and you can validate using the documentation below.

 

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/3rd-party-id.html?la...

https://developers.adobetarget.com/api/#profiles