Example #1
0
        static InterestConfirmation OutboundLeadType_NewInterestConfirmation(Lead lead, UtcDateTime now)
        {
            var greeting = "Dear Client";

            if (lead.FirstName.IsSome)
            {
                greeting = "Hi " + lead.FirstName.Val;
            }
            else if (lead.IdNumber.IsSome)
            {
                greeting = "Dear " + (lead.IsMale ? "Sir" : "Madam");
            }

            var interestedPrompt = new YesNoPrompt("ProceedPrompt", "InterestConfirmed", greeting + ". 300MB FREE when you apply now. Great Smartphone and contract deals. FREE SMS. No calls. No documents. NO=Optout. Reply YES to apply. T&Cs");
            var onOptOutMessage  = new SendMessage("OnOptOutMessage"
                                                   , "Noted. We will make sure not to send you any future Smartphone deals. To get Smartphone deals again, SMS APPLY to 39360"
                                                   , isAccepted_: false
                                                   );

            var confirmation = new InterestConfirmation(lead.MobileNo, now, new List <Step> {
                new Step("AskIfInterestedStep", new List <IAction_> {
                    interestedPrompt
                }, onOptOutMessage)
            });

            return(confirmation);
        }
Example #2
0
        public static InterestConfirmationDebug ToDebug(InterestConfirmation wf)
        {
            var dbgWf = new InterestConfirmationDebug();

            dbgWf.CreatedOn          = wf.CreatedOn.ToTimeZoneTime(_sast).ToString("yyyy/MM/dd HH:mm:ss");
            dbgWf.IsAwaitingAction   = wf.IsAwaitingAction;
            dbgWf.IsAwaitingResponse = wf.IsAwaitingResponse;
            dbgWf.IsComplete         = wf.IsAccepted;
            dbgWf.IsFinished         = wf.IsFinished;

            dbgWf.Steps = wf.Steps.Select(ToDebug).ToList();

            return(dbgWf);
        }
Example #3
0
        static InterestConfirmation UpgradeLeadType_NewInterestConfirmation(Lead lead, UtcDateTime now)
        {
            var greeting = "Dear Client";

            if (lead.FirstName.IsSome)
            {
                greeting = "Hi " + lead.FirstName.Val;
            }
            else if (lead.IdNumber.IsSome)
            {
                greeting = "Dear " + (lead.IsMale ? "Sir" : "Madam");
            }

            var interestedPrompt = new YesNoPrompt("ProceedPrompt", "InterestConfirmed", greeting + ". SmartMobile would like to let you know that you can UPGRADE your contract today with this free SMS service. Reply YES to upgrade now and select your new Smartphone. T&Cs");

            var confirmation = new InterestConfirmation(lead.MobileNo, now, new List <Step> {
                new Step("AskIfInterestedStep", new List <IAction_> {
                    interestedPrompt
                })
            });

            return(confirmation);
        }