Subversion Repositories SmartDukaan

Rev

Rev 35360 | Rev 35391 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35360 Rev 35362
Line 33... Line 33...
33
    CsService csService;
33
    CsService csService;
34
 
34
 
35
    @Override
35
    @Override
36
    public void sentMailForTrialUser(TrialForm trialForm) throws Exception {
36
    public void sentMailForTrialUser(TrialForm trialForm) throws Exception {
37
        String body =
37
        String body =
38
                "Dear Team,\r\n\r\n" +
38
                "Dear Team,<br><br>" +
39
                        "A new partner has registered via the SmartDukaan Partners App. Please review the details below and initiate the verification process immediately.\r\n\r\n" +
39
                        "A new partner has registered via the SmartDukaan Partners App. Please review the details below and initiate the verification process immediately.<br><br>" +
40
                        "Applicant Name: " + trialForm.getFirstName() + " " + trialForm.getLastName() + "\r\n" +
40
                        "<strong>Applicant Name:</strong> " + trialForm.getFirstName() + " " + trialForm.getLastName() + "<br>" +
41
                        "Business Name: " + trialForm.getBusinessName() + "\r\n" +
41
                        "<strong>Business Name:</strong> " + trialForm.getBusinessName() + "<br>" +
42
                        "Mobile: " + trialForm.getMobile() + "\r\n" +
42
                        "<strong>Mobile:</strong> " + trialForm.getMobile() + "<br>" +
43
                        "Email: " + trialForm.getEmail() + "\r\n" +
43
                        "<strong>Email:</strong> " + trialForm.getEmail() + "<br>" +
44
                        "GST Number: " + trialForm.getGstNumber() + "\r\n\r\n" +
44
                        "<strong>GST Number:</strong> " + trialForm.getGstNumber() + "<br><br>" +
45
                        "Address:\r\n" +
45
                        "<strong>Address:</strong><br>" +
46
                        trialForm.getAddressLine1() + "\r\n" +
46
                        trialForm.getAddressLine1() + "<br>" +
47
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "\r\n" : "") +
47
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "<br>" : "") +
48
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "\r\n\r\n" +
48
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "<br><br>" +
49
 
-
 
50
                        "Required Actions:\n" +
49
                        "<strong>Required Actions:</strong><br>" +
51
                        "Verify Details: Validate KYC documents and basic business information.\r\n" +
50
                        "• Verify Details: Validate KYC documents and basic business information.<br>" +
52
                        "Assess Potential: Check the location feasibility and estimated sales potential.\r\n" +
51
                        "• Assess Potential: Check the location feasibility and estimated sales potential.<br>" +
53
                        "Assign Territory: Assign the appropriate Area Sales Manager (ASM) and Business Manager (BM) in the system.\n\r\n\r\n" +
52
                        "• Assign Territory: Assign the appropriate Area Sales Manager (ASM) and Business Manager (BM) in the system.<br><br>" +
54
                        "Regards,\r\nSmartDukaan Team";
53
                        "Regards,<br>SmartDukaan Team";
-
 
54
 
55
        String[] emailTo = {"kamini.sharma@smartdukaan.com"};
55
        String[] emailTo = {"kamini.sharma@smartdukaan.com"};
56
//        String[] emailTo = {"aman.gupta@smartdukaan.com"};
56
//        String[] emailTo = {"aman.gupta@smartdukaan.com"};
57
        String[] cc = {"vaibhav.tandon@smartdukaan.com"};
57
        String[] cc = {"vaibhav.tandon@smartdukaan.com"};
58
        LOGGER.info("RegistrationBody - " + body);
58
        LOGGER.info("RegistrationBody - " + body);
59
        Utils.sendMailWithAttachments(mailSender, emailTo, cc, "New Trial Registration: " + trialForm.getBusinessName(), body);
59
        Utils.sendMailWithAttachments(mailSender, emailTo, cc, "New Trial Registration: " + trialForm.getBusinessName(), body);
Line 61... Line 61...
61
 
61
 
62
    }
62
    }
63
 
63
 
64
    public void sentMailForTrialUserToSales(TrialForm trialForm) throws Exception {
64
    public void sentMailForTrialUserToSales(TrialForm trialForm) throws Exception {
65
        String body =
65
        String body =
66
                "Sales Team Action:\r\n" +
66
                "<strong>Sales Team Action:</strong><br>" +
67
                        "A new verified partner lead has been assigned to your territory. They have successfully passed the initial verification stage.\n\r\n" +
67
                        "A new verified partner lead has been assigned to your territory. They have successfully passed the initial verification stage.<br><br>" +
68
                        "Lead Information:" +
68
                        "<strong>Lead Information:</strong><br>" +
69
                        "Applicant Name: " + trialForm.getFirstName() + " " + trialForm.getLastName() + "\r\n" +
69
                        "<strong>Applicant Name:</strong> " + trialForm.getFirstName() + " " + trialForm.getLastName() + "<br>" +
70
                        "Business Name: " + trialForm.getBusinessName() + "\r\n" +
70
                        "<strong>Business Name:</strong> " + trialForm.getBusinessName() + "<br>" +
71
                        "Mobile: " + trialForm.getMobile() + "\r\n" +
71
                        "<strong>Mobile:</strong> " + trialForm.getMobile() + "<br>" +
72
                        "Email: " + trialForm.getEmail() + "\r\n" +
72
                        "<strong>Email:</strong> " + trialForm.getEmail() + "<br>" +
73
                        "GST Number: " + trialForm.getGstNumber() + "\r\n\r\n" +
73
                        "<strong>GST Number:</strong> " + trialForm.getGstNumber() + "<br><br>" +
74
                        "Address:\r\n" +
74
                        "<strong>Address:</strong><br>" +
75
                        trialForm.getAddressLine1() + "\r\n" +
75
                        trialForm.getAddressLine1() + "<br>" +
76
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "\r\n" : "") +
76
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "<br>" : "") +
77
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "\r\n\r\n" +
77
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "<br><br>" +
78
                        "Strategic Objective: The partner has expressed initial interest. Your goal is to move them beyond trial onboarding.\r\n" +
78
                        "<strong>Strategic Objective:</strong> The partner has expressed initial interest. Your goal is to move them beyond trial onboarding.<br><br>" +
79
                        "Next Steps:\n" +
79
                        "<strong>Next Steps:</strong><br>" +
80
                        "Contact Immediately: Call or visit the store within the next 24 hours.\n" +
80
                        "• Contact Immediately: Call or visit the store within the next 24 hours.<br>" +
81
                        "The Pitch: Explain the SmartDukaan ecosystem and pitch the Full Franchise Partner Model. Emphasize the long-term higher margins, income boost, brand access, tech support, and branding benefits over the trial version.\n" +
81
                        "• The Pitch: Explain the SmartDukaan ecosystem and pitch the Full Franchise Partner Model. Emphasize the long-term higher margins, income boost, brand access, tech support, and branding benefits over the trial version.<br>" +
82
                        "Update Status: Log your interaction and the partner’s interest level in the app immediately after the meeting.\n\r\n\r\n" +
82
                        "• Update Status: Log your interaction and the partner's interest level in the app immediately after the meeting.<br><br>" +
83
                        "Good Luck, \r\n" +
83
                        "Good Luck,<br>" +
84
                        "Regards,\r\nSmartDukaan Team";
84
                        "Regards,<br>SmartDukaan Team";
-
 
85
 
85
        List<AuthUser> salesAuthUserList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L3, EscalationType.L4, EscalationType.L5));
86
        List<AuthUser> salesAuthUserList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L3, EscalationType.L4, EscalationType.L5));
86
        List<String> salesEmailList = new ArrayList<>();
87
        List<String> salesEmailList = new ArrayList<>();
87
        for (AuthUser authUser : salesAuthUserList) {
88
        for (AuthUser authUser : salesAuthUserList) {
88
            if (authUser.getEmailId() != null && !authUser.getEmailId().trim().isEmpty()) {
89
            if (authUser.getEmailId() != null && !authUser.getEmailId().trim().isEmpty()) {
89
                salesEmailList.add(authUser.getEmailId());
90
                salesEmailList.add(authUser.getEmailId());
Line 105... Line 106...
105
 
106
 
106
    }
107
    }
107
 
108
 
108
    public void sentMailForStoreCodeCreation(TrialForm trialForm) throws Exception {
109
    public void sentMailForStoreCodeCreation(TrialForm trialForm) throws Exception {
109
        String body =
110
        String body =
110
                "The trial user has been verified.\r\n" +
111
                "The trial user has been verified.<br><br>" +
111
                        "Please create Store Code for . \r\n" + trialForm.getBusinessName() +
112
                        "Please create Store Code for: <strong>" + trialForm.getBusinessName() + "</strong><br>" +
112
                        "Mobile Number. \r\n" + trialForm.getMobile() +
113
                        "Mobile Number: <strong>" + trialForm.getMobile() + "</strong><br><br>" +
113
                        "Regards,\r\nSmartDukaan Team";
114
                        "Regards,<br>SmartDukaan Team";
-
 
115
 
114
        String[] emailTo = {"gaurav.sharma@smartdukaan.com"};
116
        String[] emailTo = {"gaurav.sharma@smartdukaan.com"};
115
        LOGGER.info("RegistrationBody - " + body);
117
        LOGGER.info("RegistrationBody - " + body);
116
        String[] cc = {"devkinandan.lal@smartdukaan.com"};
118
        String[] cc = {"devkinandan.lal@smartdukaan.com"};
117
        LOGGER.info("cc list - " + Arrays.toString(cc));
119
        LOGGER.info("cc list - " + Arrays.toString(cc));
118
        Utils.sendMailWithAttachments(mailSender, emailTo, cc, "Store Code Creation Required for trial user" + trialForm.getBusinessName(), body);
120
        Utils.sendMailWithAttachments(mailSender, emailTo, cc, "Store Code Creation Required for trial user" + trialForm.getBusinessName(), body);