Example #1
0
        private static void ProcessLeadScoringThresholdPasses(ILeadScoringEventClient sender, LeadScoringThresholdPassesInfo leadScoringThresholdPassesInfo)
        {
            Console.WriteLine();
            Console.WriteLine($"{DateTime.Now.ToString()} => Receiving Lead Scoring Threshold Passes...");

            foreach (LeadScoringThresholdPass thresholdPass in leadScoringThresholdPassesInfo.ThresholdPasses)
            {
                Console.WriteLine($"Lead '{thresholdPass.LeadName}' for contact '{thresholdPass.ContactEmail}' has passed threshold '{thresholdPass.ThresholdName}' on '{thresholdPass.ThresholdPassedOn}'");
            }
        }
Example #2
0
        private static void ProcessLeadScoringThresholdPasses(ILeadScoringEventClient sender, LeadScoringThresholdPassesInfo leadScoringThresholdPassesInfo)
        {
            Console.WriteLine();
            Console.WriteLine(DateTime.Now.ToString() + " => Receiving Lead Scoring Threshold Passes...");

            foreach (LeadScoringThresholdPass thresholdPass in leadScoringThresholdPassesInfo.ThresholdPasses)
            {
                Console.WriteLine("Lead '{0}' for contact '{1}' has passed threshold '{2}' on '{3}'", thresholdPass.LeadName,
                    thresholdPass.ContactEmail, thresholdPass.ThresholdName, thresholdPass.ThresholdPassedOn);
            }
        }
Example #3
0
        private static void ErrorHandler(ILeadScoringEventClient client, ThresholdPassCallbackErrorInfo errorInfo)
        {
            // TODO: add your custom code to handle exceptions
            Console.WriteLine($"An error has occurred while checking for new threshold passes: {errorInfo.Exception.ToString()}");

            // Mark the error as handled if you wish for the client to continue working even after an error occurs
            // If you do not do this, the client will stop reporting new threshold passes after an error.
            errorInfo.Handled = true;

            // In case you deem the error critical and want to stop the threshold passes polling, mark the error as not handled
            // errorInfo.Handled = false;
        }