コード例 #1
0
ファイル: LeadType.cs プロジェクト: techtree-za/swoosh-mobile
        static Application UpgradeLeadType_NewApplicationWorkflow(Lead lead, UtcDateTime now)
        {
            var a1 = new LoadRecommendedProductsAction();
            var a2 = new RecommendProductAction();

            var a3 = new SendMessage("CongratsMessage"
                                     , "You have selected your upgrade product. Our friendly staff will be in contact to arrange delivery. Happy phoning."
                                     , isAccepted_: true
                                     );

            var application = new Application(lead.MobileNo, now, new List <Step> {
                new Step("LoadRecommendedProductsStep", new List <IAction_> {
                    a1
                }),
                new Step("ChooseProductStep", new List <IAction_> {
                    a2
                }),
                new Step("CongratsStep", new List <IAction_> {
                    a3
                })
            });

            return(application);
        }
コード例 #2
0
ファイル: LeadType.cs プロジェクト: techtree-za/swoosh-mobile
        static Application OutboundLeadType_NewApplicationWorkflow(Lead lead, UtcDateTime now)
        {
            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 a1 = new LoadRecommendedProductsAction();
            var a2 = new RecommendProductAction();

            var a3 = new IdNoVerifyAndSurnamePrompt("IdVerifyAndSurnamePrompt", "We won't take too much of your time. Please reply with your surname and the first 6 digits of your ID number. Example: Williams 740412");


            var a4 = new BankDetailsPrompt("BankDetailsPrompt", "To apply, reply with your bank name, account no and type. Example: Capitec 100112 Savings. Your info is SECURED");

            var a5 = new VerifyBankAccountAction();
            var onRejectAccountVerification = new SendMessage("OnRejectAccountVerification"
                                                              , "Something went wrong while confirming your bank account details. Please ensure your account details are correct."
                                                              , isAccepted_: false
                                                              );

            var a6 = new FreeTextPrompt("CompanyNamePrompt", "EmployerName", "For FAST & FREE delivery to your work address reply with your Employer's Name. Example: iSmart");

            var a7 = new FreeTextPrompt("CompanyAddressPrompt", "EmployerAddress", "Almost done! Reply with your Employer's Street Address. Example: 15 Vilakazi str, Soweto, Gauteng, 1803");

            var a8 = new YesNoPrompt("AcceptT&CsPrompt", "AcceptT&Cs", $"View your T&Cs here: https://swoosh-mobile-prod.azurewebsites.net/tAndCs/{lead.Id}. Reply YES to agree and complete your application");

            var a9 = new SendMessage("CongratsMessage"
                                     , "Your brand new Smartphone is on its way. The couriers will contact you to arrange for FREE delivery to your work address. Enjoy your day"
                                     , isAccepted_: true
                                     );

            var application = new Application(lead.MobileNo, now, new List <Step> {
                new Step("LoadRecommendedProductsStep", new List <IAction_> {
                    a1
                }),
                new Step("ChooseProductStep", new List <IAction_> {
                    a2
                }),
                new Step("VerifyIdNoAndSurnameStep", new List <IAction_> {
                    a3
                }),
                new Step("AskBankDetailsStep", new List <IAction_> {
                    a4
                }),
                new Step("VerifyBankDetailsStep", new List <IAction_> {
                    a5
                }, onRejectAccountVerification, "AskBankDetailsStep", 2),
                new Step("AskCompanyNameStep", new List <IAction_> {
                    a6
                }),
                new Step("AskCompanyAddressStep", new List <IAction_> {
                    a7
                }),
                new Step("AcceptT&CsStep", new List <IAction_> {
                    a8
                }, onOptOutMessage),
                new Step("CongratsStep", new List <IAction_> {
                    a9
                })
            });

            return(application);
        }
コード例 #3
0
ファイル: LeadType.cs プロジェクト: techtree-za/swoosh-mobile
        static Application InboundLeadType_NewApplicationWorkflow(Lead lead, UtcDateTime now)
        {
            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 a2 = new IdNoSurnamePrompt("IdSurnamePrompt", "We want to give you the best deal. We need to see which deals you qualify for. Reply with your Surname and ID number. All info is SECURED. Example: Williams 7404125001087");

            var a3 = new ScoringAction(minAcceptableScore: 0);

            var onRejectScore = new SendMessage("OnRejectScoreMessage"
                                                , "Unfortunately, you have not qualified for a Smartphone. If your circumstances change, please reply with APPLY to 39360"
                                                , isAccepted_: false
                                                );

            var a4 = new LoadRecommendedProductsAction();
            var a5 = new RecommendProductAction();

            var a6 = new BankDetailsPrompt("BankDetailsPrompt", "To apply, reply with your bank name, account no and type. Example: Capitec 100112 Savings. Your info is SECURED");

            var a7 = new VerifyBankAccountAction();
            var onRejectAccountVerification = new SendMessage("OnRejectAccountVerification"
                                                              , "Something went wrong while confirming your bank account details. Please ensure your account details are correct."
                                                              , isAccepted_: false
                                                              );

            var a8 = new FreeTextPrompt("CompanyNamePrompt", "EmployerName", "Thanks. Your banking details are verified, and application approved. For FREE delivery to your work address reply with your Employer's Name. Example: iSmart");

            var a9 = new FreeTextPrompt("CompanyAddressPrompt", "EmployerAddress", "Almost done! Reply with your Employer's Street Address. Example: 15 Vilakazi str, Soweto, Gauteng, 1803");

            var a10 = new YesNoPrompt("AcceptT&CsPrompt", "AcceptT&Cs", $"View your T&Cs here: https://swoosh-mobile-prod.azurewebsites.net/tAndCs/{lead.Id}. Reply YES to agree and complete your application");

            var a11 = new SendMessage("CongratsMessage"
                                      , "Your brand new Smartphone is on its way. The couriers will contact you to arrange for FREE delivery to your work address. Enjoy your day"
                                      , isAccepted_: true
                                      );

            var application = new Application(lead.MobileNo, now, new List <Step> {
                new Step("AskIdNoAndSurnameStep", new List <IAction_> {
                    a2
                }),
                new Step("ScoreCustomerStep", new List <IAction_> {
                    a3
                }, onRejectScore),
                new Step("LoadRecommendedProductsStep", new List <IAction_> {
                    a4
                }, onRejectScore),
                new Step("ChooseProductStep", new List <IAction_> {
                    a5
                }),
                new Step("AskBankDetailsStep", new List <IAction_> {
                    a6
                }),
                new Step("VerifyBankDetailsStep", new List <IAction_> {
                    a7
                }, onRejectAccountVerification, "AskBankDetailsStep", 2),
                new Step("AskCompanyNameStep", new List <IAction_> {
                    a8
                }),
                new Step("AskCompanyAddressStep", new List <IAction_> {
                    a9
                }),
                new Step("AcceptT&CsStep", new List <IAction_> {
                    a10
                }, onOptOutMessage),
                new Step("CongratsStep", new List <IAction_> {
                    a11
                })
            });

            return(application);
        }