EndecaIntegrationfrom the archive⏱ 1 min read

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 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

Discussion (0)

Technical questions and architecture discussions

No comments yet. Have a question about this architecture pattern? Leave a response below.

Join the Discussion

Leave a comment

Comments are reviewed before they appear.