Created
November 23, 2023 16:20
-
-
Save steliodibello/b4bacc3d79a14efb3a49a0cc462bec5a to your computer and use it in GitHub Desktop.
This file contains 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
using Sitecore.Analytics; | |
using Sitecore.Analytics.XConnect.Facets; | |
using Sitecore.Diagnostics; | |
using Sitecore.Rules; | |
using Sitecore.Rules.Conditions; | |
using Sitecore.XConnect; | |
using Sitecore.Xdb.Configuration; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace XXXX.Foundation.XConnect.Rules | |
{ | |
public class SalesforceCustomCampaign<T> : StringOperatorCondition<T> where T : RuleContext | |
{ | |
public string CampaignValue { get; set; } | |
protected override bool Execute(T ruleContext) | |
{ | |
Assert.ArgumentNotNull(ruleContext, "ruleContext"); | |
Log.Info($"[SalesforceCustomCampaignRule] EvaluatingRule", this); | |
/*Add your custom logic to return true if the rule is satisfied and false if it is not | |
eg. check cookies, querystring or any other fancy code you need... | |
*/ | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment