Created
December 2, 2017 12:33
-
-
Save hishaamn/716758107338967079f864dd499377b2 to your computer and use it in GitHub Desktop.
Check if user has already the specified outcome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Guid outcomeId= // your outcome ID | |
| KeyBehaviorCache cache = Sitecore.Analytics.Tracker.Current.Contact.GetKeyBehaviorCache(); | |
| bool isAssociatedOutcome = cache.Outcomes.Any(a => a.Id == outcomeId); | |
| if(!isAssociatedOutcome) | |
| { | |
| // continue with assignment of Outcome here | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment