Wednesday, December 14, 2016

How to add user segment from ATG to Endeca witout creating segment in ATG?

ATG passes all the user segments to endeca query based on profile to tigger different rule or content. There are some situations where som... thumbnail 1 summary

ATG passes all the user segments to endeca query based on profile to tigger different rule or content. There are some situations where some user segment does not exist in profile but required for endeca query to trigger different types of content.

Example :- Show different banner if user is coming from affiliate A and show different banner if user is coming from affiliate B.

This can be achived using below code to add user sgament based on different business logic

public class ExtendNavigationStateProcessor implements NavigationStateProcessor {
  private UserState mUserState = null;
  @Override
public void process(NavigationState pNavigationState) {

 if(Condition-1){
getUserState().addUserSegments("Affliate-A");
}
else{
getUserState().addUserSegments("Affliate-B");
}
}

public UserState getUserState() {
return mUserState;
}

public void setUserState(UserState pUserState) {
mUserState = pUserState;
}

}


From Author
Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

No comments

Post a Comment

Note: Only a member of this blog may post a comment.

Text Widget