If you are wanting to trigger a user to go into a persona automatically, you can do it with the code below. You need to create a profile, profile key and a persona that has a level set for your profile key. Then you can register a hit to the profile high enough to trigger the persona.
You have to call the profile by name. I have not found a way to call it by ID other that calling the item and getting the name from the profile item.
- profile is the profile
- profileitem is the profile key
code
var profile = Tracker.Current.Interaction.Profiles[Constants.Items.Profiles.Industry.Name];
var scores = new Dictionary<string, float> { { profileItem.Name, 10 } };
profile.Score(scores);
profile.UpdatePattern();
For just how to make profiles and scoring working, see my answer here Behavioral personalization?Behavioral personalization?