diff --git a/config/default.js b/config/default.js index 8b911c3c..e3dc3cf8 100644 --- a/config/default.js +++ b/config/default.js @@ -179,8 +179,6 @@ module.exports = { INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL || 'talent@topcoder.com', // the URL where TaaS App is hosted TAAS_APP_URL: process.env.TAAS_APP_URL || 'https://platform.topcoder-dev.com/taas/myteams', - // the URL where TaaS App Earn is hosted - TAAS_APP_EARN_URL: process.env.TAAS_APP_EARN_URL || 'https://platform.topcoder-dev.com/earn/my-gigs', // environment variables for Payment Service ROLE_ID_SUBMITTER: process.env.ROLE_ID_SUBMITTER || '732339e7-8e30-49d7-9198-cccf9451e221', TYPE_ID_TASK: process.env.TYPE_ID_TASK || 'ecd58c69-238f-43a4-a4bb-d172719b9f31', @@ -253,30 +251,8 @@ module.exports = { }, // the sender email NOTIFICATION_SENDER_EMAIL: process.env.NOTIFICATION_SENDER_EMAIL || 'noreply@topcoder.com', - // the email notification sendgrid template id of candidate was viewed by client - NOTIFICATION_CLIENT_VIEWED_PROFILE_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_CLIENT_VIEWED_PROFILE_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of candidates are available for review - NOTIFICATION_REVIEW_CANDIDATES_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_REVIEW_CANDIDATES_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of interview coming up for customer - NOTIFICATION_CUSTOMER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_CUSTOMER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of interview coming up for member - NOTIFICATION_MEMBER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_MEMBER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of interview completed - NOTIFICATION_INTERVIEW_COMPLETE_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_INTERVIEW_COMPLETE_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of post interview action reminder - NOTIFICATION_POST_INTERVIEW_ACTION_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_POST_INTERVIEW_ACTION_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of upcoming resource booking expiration - NOTIFICATION_UPCOMING_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_UPCOMING_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of new team created - NOTIFICATION_NEW_TEAM_CREATED_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_NEW_TEAM_CREATED_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of new job added to existing project - NOTIFICATION_NEW_JOB_ADDED_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_NEW_JOB_ADDED_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of resource placed - NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of interviews overlapping - NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID, - // the email notification sendgrid template id of job candidate selected - NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID, + // the email notification sendgrid template id + NOTIFICATION_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_SENDGRID_TEMPLATE_ID, // frequency of cron checking for available candidates for review CRON_CANDIDATE_REVIEW: process.env.CRON_CANDIDATE_REVIEW || '00 00 13 * * 0-6', // frequency of cron checking for coming up interviews diff --git a/config/email_template.config.js b/config/email_template.config.js index fc5d4118..524d54f1 100644 --- a/config/email_template.config.js +++ b/config/email_template.config.js @@ -112,88 +112,88 @@ module.exports = { */ notificationEmailTemplates: { 'taas.notification.job-candidate-resume-viewed': { - subject: 'Client has viewed your Topcoder profile', + subject: 'Topcoder - Client View Resume for Job {{jobName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_CLIENT_VIEWED_PROFILE_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.candidates-available-for-review': { - subject: 'You have candidates to review', + subject: 'Topcoder - {{teamName}} has job candidates available for review', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_REVIEW_CANDIDATES_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.interview-coming-up-host': { - subject: 'Interview reminder: Your Topcoder interview is coming up', + subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{guestFullName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_CUSTOMER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.interview-coming-up-guest': { - subject: 'Reminder: Interview coming up', + subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{hostFullName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_MEMBER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.interview-awaits-resolution': { - subject: 'Interview complete - here’s what to do next', + subject: 'Topcoder - Interview Awaits Resolution: {{jobTitle}} for {{guestFullName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_INTERVIEW_COMPLETE_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.post-interview-action-required': { - subject: 'Reminder: Take action to reserve your talent', + subject: 'Topcoder - Candidate Action Required in {{teamName}} for {{numCandidates}} candidates', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_POST_INTERVIEW_ACTION_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.resource-booking-expiration': { - subject: 'Reminder: 3 weeks left in your Angular Developer’s gig', + subject: 'Topcoder - Resource Booking Expiring in {{teamName}} for {{numResourceBookings}} resource bookings', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_UPCOMING_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.team-created': { - subject: 'Your Topcoder talent request confirmation', + subject: 'Topcoder - New Team {{teamName}} Created', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_NEW_TEAM_CREATED_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.job-created': { - subject: 'New job added to your Topcoder team', + subject: 'Topcoder - New Job {{jobTitle}} Created in Team {{teamName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_NEW_JOB_ADDED_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.interviews-overlapping': { subject: 'Topcoder - Interviews overlapping', body: '', recipients: config.NOTIFICATION_OPS_EMAILS, from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.job-candidate-selected': { subject: 'Topcoder - Job Candidate {{userHandle}} Selected for {{jobTitle}} in Team {{teamName}}', body: '', recipients: config.NOTIFICATION_OPS_EMAILS, from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID }, 'taas.notification.resource-booking-placed': { - subject: 'Your Topcoder talent is confirmed! How to start working with them.', + subject: 'Topcoder - Resource Booking {{userHandle}} Placed for Job {{jobTitle}} in Team {{teamName}}', body: '', recipients: [], from: config.NOTIFICATION_SENDER_EMAIL, - sendgridTemplateId: config.NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID + sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID } } } diff --git a/data/notification-email-templates/candidate-was-viewed-by-client-email-template.html b/data/notification-email-templates/candidate-was-viewed-by-client-email-template.html deleted file mode 100644 index e99d2fb7..00000000 --- a/data/notification-email-templates/candidate-was-viewed-by-client-email-template.html +++ /dev/null @@ -1,249 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Update on Your Application
-
- - - - - - - - - -
IMG - Client Has Viewed Your Profile -
-
- - - - - - -
- - - - - - - - - -
- -
- Thanks for applying for a Topcoder Gig. This is an update to let you know that the client has viewed your profile. We will notify you about next steps. - -
-
- To check the status of all your Gig Work applications, log in to your Topcoder account and head to My Gigs → Open Applications. - -
-
- -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/candidates-are-available-for-review-email-template.html b/data/notification-email-templates/candidates-are-available-for-review-email-template.html deleted file mode 100644 index 64fd2478..00000000 --- a/data/notification-email-templates/candidates-are-available-for-review-email-template.html +++ /dev/null @@ -1,274 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Your Candidates
-
- - - - - - - - - -
IMG - Here are Your Candidates Awaiting Review - -
-
- - - - - - -
- - - - - - - - - -
- -
- You’ve matched with talent! Use the link below to review your candidates. You can schedule an interview if you want to move forward, or decline if they’re not a match. -
-
- - - - - - - - {{#each teamJobs}} - - - - - - - {{/each}} -
Job titleNo of resource bookingsCandidatesReview
- {{this.title}} - {{this.nResourceBookings}} -
    - {{#each this.jobCandidates}} -
  • {{this.handle}}
  • - {{/each}} -
-
- Link -
- -
- Review Your Candidates - -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/customer-interview-coming-up-email-template.html b/data/notification-email-templates/customer-interview-coming-up-email-template.html deleted file mode 100644 index 440462c1..00000000 --- a/data/notification-email-templates/customer-interview-coming-up-email-template.html +++ /dev/null @@ -1,274 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Interview Coming Up
-
- - - - - - - - - -
IMG - Reminder: You Have an Upcoming Interview -
-
- - - - - - -
- - - - - - - - - -
- -
- Ohhh the butterflies before a first date. Just kidding, this is totally professional. But meeting someone who could potentially make your life a lot easier is very exciting. -
-
- This is your reminder that you have an interview coming up with an awesome Topcoder freelance candidate. Click the link below to review their resume and profile before the big event. -
-
- - - - - - - - - - - - - - - -
Job titleCandidate HandleInterviewsAttendeesDate and Time
- {{this.jobTitle}} - {{this.handle}} - Link -
    - {{#each this.attendees}} -
  • {{this}}
  • - {{/each}} -
-
{{this.startTime}}
- -
- Candidate resume and profile -

Can’t wait to hear how it goes,
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/interview-completed-email-template.html b/data/notification-email-templates/interview-completed-email-template.html deleted file mode 100644 index 5b4e0b97..00000000 --- a/data/notification-email-templates/interview-completed-email-template.html +++ /dev/null @@ -1,277 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Next Steps with Your Candidate
-
- - - - - - - - - -
IMG - Interview Complete, What To Do Next -
-
- - - - - - -
- - - - - - - - - -
- -
- Thanks for taking the time to interview your candidate. We hope it went well and that they are a perfect fit. Now it’s time to take action: -
-
- Use the link below to Accept, Decline, or schedule another interview. Don’t wait—Topcoder talent is in high-demand: -
-
- - - - - - - - - - - - - - - -
Job titleCandidate HandleDate and TimeAttendeesInterviews
- {{this.jobTitle}} - {{this.handle}}{{this.startTime}} -
    - {{#each this.attendees}} -
  • {{this}}
  • - {{/each}} -
-
- Link
- -
- Take action on your candidates -
-
- Any issues with this interview? Please contact us here. -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/interviews-overlapping-email-template.html b/data/notification-email-templates/interviews-overlapping-email-template.html deleted file mode 100644 index 14d9ec44..00000000 --- a/data/notification-email-templates/interviews-overlapping-email-template.html +++ /dev/null @@ -1,262 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Topcoder Gig Work
-
- - - - - - - - - -
IMG - {{description}} -
-
- - - - - - -
- - - - - - - - - -
- - - - - - - - - - - {{#each interviews}} - - - - - - - - {{/each}} -
Team NameJob TitleJob CandidateInterview Start DateInterview End Date
{{this.teamName}}{{this.jobTitle}}{{this.candidateUserHandle}}{{this.startTime}}{{this.endTime}}
- -
- If you have any questions about this process or if you encounter any issues coordinating your availability, you may reply to this email or send a separate email to our Gig Work operations team. - -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/job-candidate-selected-email-template.html b/data/notification-email-templates/job-candidate-selected-email-template.html deleted file mode 100644 index 86dc733c..00000000 --- a/data/notification-email-templates/job-candidate-selected-email-template.html +++ /dev/null @@ -1,260 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Topcoder Gig Work
-
- - - - - - - - - -
IMG - {{description}} -
-
- - - - - - -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - -
Team NameJob TitleJob Start DateJob DurationJob Candidate
{{teamName}}{{jobTitle}}{{jobStartDate}}{{jobDuration}}{{userHandle}}
- -
- If you have any questions about this process or if you encounter any issues coordinating your availability, you may reply to this email or send a separate email to our Gig Work operations team. - -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/members-interview-coming-up-email-template.html b/data/notification-email-templates/members-interview-coming-up-email-template.html deleted file mode 100644 index d24ab4f5..00000000 --- a/data/notification-email-templates/members-interview-coming-up-email-template.html +++ /dev/null @@ -1,247 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Reminder: Interview with Client
-
- - - - - - - - - -
IMG - You Have an Upcoming Interview -
-
- - - - - - -
- - - - - - - - - -
- -
- You have an interview coming up for a Topcoder gig! See the job and get the meeting link here. -
-
- If you’re signed in to your Topcoder account, you can also find this information on the My Gigs Applications page. - -
- -

Good luck at the interview!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/new-job-added-to-existing-project-email-template.html b/data/notification-email-templates/new-job-added-to-existing-project-email-template.html deleted file mode 100644 index d72610f2..00000000 --- a/data/notification-email-templates/new-job-added-to-existing-project-email-template.html +++ /dev/null @@ -1,260 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Update
-
- - - - - - - - - -
IMG - New Job Added to Your Team -
-
- - - - - - -
- - - - - - - - - -
- -
- We’ve received your request for a new role on your team. We’ll notify you when you have a new candidate to review. You can add more roles to your team any time. -
-
- - - - - - - - - - - - - -
Team NameJob TitleJob Start DateJob Duration
{{teamName}}{{jobTitle}}{{jobStartDate}}{{jobDuration}}
- -
- -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/new-team-created-email-template.html b/data/notification-email-templates/new-team-created-email-template.html deleted file mode 100644 index 8ecfd7b1..00000000 --- a/data/notification-email-templates/new-team-created-email-template.html +++ /dev/null @@ -1,260 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Your Request is Confirmed
-
- - - - - - - - - -
IMG - Talent Request Confirmed -
-
- - - - - - -
- - - - - - - - - -
- -
- Congratulations! You’ve successfully submitted your talent request to Topcoder. We’ll notify you when you have a new candidate to review. You can add more roles to your team at any time. -
-
- - - - - - - {{#each jobList}} - - - - - - {{/each}} -
Job TitleJob Start DateJob Duration
{{this.title}}{{this.startDate}}{{this.duration}}
- -
- Thanks for your request. We look forward to bringing you awesome freelance talent. -

- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/post-interview-action-reminder-email-template.html b/data/notification-email-templates/post-interview-action-reminder-email-template.html deleted file mode 100644 index 7165f5f4..00000000 --- a/data/notification-email-templates/post-interview-action-reminder-email-template.html +++ /dev/null @@ -1,276 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Reminder: Ghosting Is Not Cool
-
- - - - - - - - - -
IMG - Take Action on This Candidate -
-
- - - - - - -
- - - - - - - - - -
- -
- Use the link below to Accept, Decline, or schedule another interview with your candidate. This person might have an offer on another gig, and is awaiting your response to make a decision. Please do this now: -
-
- - - - - - - - - {{#each teamInterviews}} - - - - - - - - {{/each}} -
Job titleHandleDate and TimeAttendeesInterviews
- {{this.jobTitle}} - {{this.handle}}{{this.startTime}} -
    - {{#each this.attendees}} -
  • {{this}}
  • - {{/each}} -
-
- Link
- -
- Take action on your candidates -
-
- Any issues? Please contact us here. -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/resource-placed-email-template.html b/data/notification-email-templates/resource-placed-email-template.html deleted file mode 100644 index 4137f41b..00000000 --- a/data/notification-email-templates/resource-placed-email-template.html +++ /dev/null @@ -1,262 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Get Excited
-
- - - - - - - - - -
IMG - Your Topcoder Talent is Confirmed -
-
- - - - - - -
- - - - - - - - - -
- -
- Pop the metaphorical champagne. Your Topcoder talent is officially confirmed! This person is super excited to work with you. Here are the details. -
-
- - - - - - - - - - - - - - - -
Team NameJob TitleResource Booking HandleResource Booking Start DateResource Booking End Date
{{teamName}}{{jobTitle}}{{userHandle}}{{startDate}}{{endDate}}
- -
- -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notification-email-templates/upcoming-resource-booking-expiration-email-template.html b/data/notification-email-templates/upcoming-resource-booking-expiration-email-template.html deleted file mode 100644 index 46b3ae37..00000000 --- a/data/notification-email-templates/upcoming-resource-booking-expiration-email-template.html +++ /dev/null @@ -1,267 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
IMG -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- Reminder
-
- - - - - - - - - -
IMG - Work End Date Approaching -
-
- - - - - - -
- - - - - - - - - -
- -
- Good things can’t last forever, and your freelancer’s work End Date is approaching. Want to continue working with them? Request an extension here by clicking on the Actions menu and selecting “Request an Extension”. -
-
- To check the end date for any talent on your team, log in to your account and head to your Teams page. -
-
- - - - - - - {{#each teamResourceBookings}} - - - - - - {{/each}} -
Job titleResource Bookings HandleEnd Date
- {{this.jobTitle}} - - {{this.handle}} - {{this.endDate}}
- -
- -

Thanks!
- The Topcoder Team -

-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 201 S Capitol Ave #1100
- Indianapolis, IN 46225 United States
-
- ●●●
-
- Topcoder System Information: -
- InterviewType: {{xai_template}}
-
- - - - - - -
-
-
diff --git a/data/notifications-email-template.html b/data/notifications-email-template.html new file mode 100644 index 00000000..f0da558d --- /dev/null +++ b/data/notifications-email-template.html @@ -0,0 +1,492 @@ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + +
IMG +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ Topcoder Gig Work
+
+ + + + + + + + + +
IMG + {{description}} +
+
+ + + + + + +
+ + + + + + + + +
+ + {{#if notificationType.candidatesAvailableForReview}} + + + + + + + + {{#each teamJobs}} + + + + + + + {{/each}} +
Job titleNo of resource bookingsCandidatesReview
+ {{this.title}} + {{this.nResourceBookings}} +
    + {{#each this.jobCandidates}} +
  • {{this.handle}}
  • + {{/each}} +
+
+ Link +
+ {{/if}} + + {{#if notificationType.interviewComingUpForHost}} + + + + + + + + + + + + + + + +
Job titleCandidate HandleInterviewsAttendeesDate and Time
+ {{this.jobTitle}} + {{this.handle}} + Link +
    + {{#each this.attendees}} +
  • {{this}}
  • + {{/each}} +
+
{{this.startTime}}
+ {{/if}} + + {{#if notificationType.interviewComingUpForGuest}} + + + + + + + + + + + +
Job titleDate and TimeInterviews
+ {{this.jobTitle}} + {{this.startTime}} + Link
+ {{/if}} + + {{#if notificationType.interviewCompleted}} + + + + + + + + + + + + + + + +
Job titleCandidate HandleDate and TimeAttendeesInterviews
+ {{this.jobTitle}} + {{this.handle}}{{this.startTime}} +
    + {{#each this.attendees}} +
  • {{this}}
  • + {{/each}} +
+
+ Link
+ {{/if}} + + {{#if notificationType.postInterviewCandidateAction}} + + + + + + + + + {{#each teamInterviews}} + + + + + + + + {{/each}} +
Job titleHandleDate and TimeAttendeesInterviews
+ {{this.jobTitle}} + {{this.handle}}{{this.startTime}} +
    + {{#each this.attendees}} +
  • {{this}}
  • + {{/each}} +
+
+ Link
+ {{/if}} + + {{#if notificationType.upcomingResourceBookingExpiration}} + Team Name: + {{teamName}} + + + + + + + {{#each teamResourceBookings}} + + + + + + {{/each}} +
Job titleResource Bookings HandleEnd Date
+ {{this.jobTitle}} + + {{this.handle}} + {{this.endDate}}
+ {{/if}} + + {{#if notificationType.jobCandidateResumeViewed}} + Hi {{jobCandidateUserHandle}}.

+ + Your resume for the job "{{jobName}}" has been viewed by the client.
+ {{/if}} + + {{#if notificationType.newTeamCreated}} + Team: + {{teamName}} + + + + + + + {{#each jobList}} + + + + + + {{/each}} +
Job TitleJob Start DateJob Duration
{{this.title}}{{this.startDate}}{{this.duration}}
+ {{/if}} + {{#if notificationType.newJobCreated}} + + + + + + + + + + + + + +
Team NameJob TitleJob Start DateJob Duration
{{teamName}}{{jobTitle}}{{jobStartDate}}{{jobDuration}}
+ {{/if}} + {{#if notificationType.overlappingInterview}} + + + + + + + + + {{#each interviews}} + + + + + + + + {{/each}} +
Team NameJob TitleJob CandidateInterview Start DateInterview End Date
{{this.teamName}}{{this.jobTitle}}{{this.candidateUserHandle}}{{this.startTime}}{{this.endTime}}
+ {{/if}} + {{#if notificationType.candidateSelected}} + + + + + + + + + + + + + + + +
Team NameJob TitleJob Start DateJob DurationJob Candidate
{{teamName}}{{jobTitle}}{{jobStartDate}}{{jobDuration}}{{userHandle}}
+ {{/if}} + {{#if notificationType.resourceBookingPlaced}} + + + + + + + + + + + + + + + +
Team NameJob TitleResource Booking HandleResource Booking Start DateResource Booking End Date
{{teamName}}{{jobTitle}}{{userHandle}}{{startDate}}{{endDate}}
+ {{/if}} + +
+ If you have any questions about this process or if you encounter any issues coordinating your availability, you may reply to this email or send a separate email to our Gig Work operations team. + +

Thanks!
+ The Topcoder Team +

+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 201 S Capitol Ave #1100
+ Indianapolis, IN 46225 United States
+
+ ●●●
+
+ Topcoder System Information: +
+ InterviewType: {{xai_template}}
+
+ + + + + + +
+
+
diff --git a/scripts/demo-email-notifications/README.md b/scripts/demo-email-notifications/README.md index 3284b1fa..e55e275d 100644 --- a/scripts/demo-email-notifications/README.md +++ b/scripts/demo-email-notifications/README.md @@ -10,25 +10,13 @@ This script does 2 things: 1. Config scheduler to run more often so we don't have to wait to long for triggering notification, like every minute: ```sh -2CRON_CANDIDATE_REVIEW=0 */1 * * * * + CRON_CANDIDATE_REVIEW=0 */1 * * * * CRON_INTERVIEW_COMING_UP=0 */1 * * * * CRON_INTERVIEW_COMPLETED=0 */1 * * * * CRON_POST_INTERVIEW=0 */1 * * * * CRON_UPCOMING_RESOURCE_BOOKING=0 */1 * * * * INTERVIEW_COMING_UP_MATCH_WINDOW=PT1M INTERVIEW_COMPLETED_MATCH_WINDOW=PT1M - NOTIFICATION_CLIENT_VIEWED_PROFILE_SENDGRID_TEMPLATE_ID=1 - NOTIFICATION_REVIEW_CANDIDATES_SENDGRID_TEMPLATE_ID=2 - NOTIFICATION_CUSTOMER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID=3 - NOTIFICATION_MEMBER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID=4 - NOTIFICATION_INTERVIEW_COMPLETE_SENDGRID_TEMPLATE_ID=5 - NOTIFICATION_POST_INTERVIEW_ACTION_SENDGRID_TEMPLATE_ID=6 - NOTIFICATION_UPCOMING_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID=7 - NOTIFICATION_NEW_TEAM_CREATED_SENDGRID_TEMPLATE_ID=8 - NOTIFICATION_NEW_JOB_ADDED_SENDGRID_TEMPLATE_ID=9 - NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID=10 - NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID=11 - NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID=12 ``` 2. Config `SLACK_WEBHOOK_URL` env, if you want to send slack notifications diff --git a/scripts/demo-email-notifications/index.js b/scripts/demo-email-notifications/index.js index e4554531..328b3fa8 100644 --- a/scripts/demo-email-notifications/index.js +++ b/scripts/demo-email-notifications/index.js @@ -16,20 +16,7 @@ const localLogger = { info: message => logger.info({ component: 'render email content', context: 'test', message }) } -const templateFileMap = { - [config.NOTIFICATION_CLIENT_VIEWED_PROFILE_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/candidate-was-viewed-by-client-email-template.html', 'utf8')), - [config.NOTIFICATION_REVIEW_CANDIDATES_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/candidates-are-available-for-review-email-template.html', 'utf8')), - [config.NOTIFICATION_CUSTOMER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/customer-interview-coming-up-email-template.html', 'utf8')), - [config.NOTIFICATION_MEMBER_INTERVIEW_COMING_UP_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/members-interview-coming-up-email-template.html', 'utf8')), - [config.NOTIFICATION_INTERVIEW_COMPLETE_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/interview-completed-email-template.html', 'utf8')), - [config.NOTIFICATION_POST_INTERVIEW_ACTION_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/post-interview-action-reminder-email-template.html', 'utf8')), - [config.NOTIFICATION_UPCOMING_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/upcoming-resource-booking-expiration-email-template.html', 'utf8')), - [config.NOTIFICATION_NEW_TEAM_CREATED_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/new-team-created-email-template.html', 'utf8')), - [config.NOTIFICATION_NEW_JOB_ADDED_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/new-job-added-to-existing-project-email-template.html', 'utf8')), - [config.NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/interviews-overlapping-email-template.html', 'utf8')), - [config.NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/job-candidate-selected-email-template.html', 'utf8')), - [config.NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID]: handlebars.compile(fs.readFileSync('./data/notification-email-templates/resource-placed-email-template.html', 'utf8')) -} +const template = handlebars.compile(fs.readFileSync('./data/notifications-email-template.html', 'utf8')) /** * Reset notification records @@ -90,7 +77,7 @@ async function initConsumer () { } if (message.payload.notifications) { _.forEach(_.filter(message.payload.notifications, ['serviceId', 'email']), (notification) => { - const email = templateFileMap[notification.details.sendgridTemplateId](notification.details.data) + const email = template(notification.details.data) fs.writeFileSync(`./out/${notification.details.data.subject}-${Date.now()}.html`, email) }) for (const notification of _.filter(message.payload.notifications, ['serviceId', 'slack'])) { diff --git a/src/eventHandlers/InterviewEventHandler.js b/src/eventHandlers/InterviewEventHandler.js index 22b0d44e..034c1a8f 100644 --- a/src/eventHandlers/InterviewEventHandler.js +++ b/src/eventHandlers/InterviewEventHandler.js @@ -108,7 +108,11 @@ async function checkOverlapping (payload) { recipients: (template.recipients || []).map(email => ({ email })), data: { subject: template.subject, - interviews + interviews, + notificationType: { + overlappingInterview: true + }, + description: 'Overlapping Job Candidate Interviews' }, sendgridTemplateId: template.sendgridTemplateId, version: 'v3' diff --git a/src/eventHandlers/JobCandidateEventHandler.js b/src/eventHandlers/JobCandidateEventHandler.js index 6ea679d3..2e389879 100644 --- a/src/eventHandlers/JobCandidateEventHandler.js +++ b/src/eventHandlers/JobCandidateEventHandler.js @@ -165,7 +165,11 @@ async function sendJobCandidateSelectedNotification (payload) { jobStartDate: helper.formatDateEDT(job.startDate), userHandle: user.handle, jobUrl, - rcrmJobUrl + rcrmJobUrl, + notificationType: { + candidateSelected: true + }, + description: 'Job Candidate Selected' } data.subject = helper.substituteStringByObject(data.subject, data) const emailData = { diff --git a/src/eventHandlers/JobEventHandler.js b/src/eventHandlers/JobEventHandler.js index c92c1920..f736502c 100644 --- a/src/eventHandlers/JobEventHandler.js +++ b/src/eventHandlers/JobEventHandler.js @@ -91,7 +91,11 @@ async function sendNotifications (payload) { jobTitle: payload.value.title, jobURL: `${config.TAAS_APP_URL}/${project.id}/positions/${payload.value.id}`, jobDuration: payload.value.duration, - jobStartDate: helper.formatDateEDT(payload.value.startDate) + jobStartDate: helper.formatDateEDT(payload.value.startDate), + notificationType: { + newJobCreated: true + }, + description: 'New Job Created' } data.subject = helper.substituteStringByObject(data.subject, data) diff --git a/src/eventHandlers/ResourceBookingEventHandler.js b/src/eventHandlers/ResourceBookingEventHandler.js index 7b20427a..de4f125e 100644 --- a/src/eventHandlers/ResourceBookingEventHandler.js +++ b/src/eventHandlers/ResourceBookingEventHandler.js @@ -97,7 +97,11 @@ async function sendPlacedNotifications (payload) { jobUrl, userHandle: user.handle, startDate: resourceBooking.startDate, - endDate: resourceBooking.endDate + endDate: resourceBooking.endDate, + notificationType: { + resourceBookingPlaced: true + }, + description: 'Resource Booking is Placed' } data.subject = helper.substituteStringByObject(data.subject, data) const emailData = { diff --git a/src/eventHandlers/TeamEventHandler.js b/src/eventHandlers/TeamEventHandler.js index 3fd0a775..985ffc61 100644 --- a/src/eventHandlers/TeamEventHandler.js +++ b/src/eventHandlers/TeamEventHandler.js @@ -24,7 +24,11 @@ async function sendNotificationEmail (payload) { duration: j.duration, startDate: helper.formatDateEDT(j.startDate), jobUrl: `${config.TAAS_APP_URL}/${payload.project.id}/positions/${j.id}` - })) + })), + notificationType: { + newTeamCreated: true + }, + description: 'New Team Created' } data.subject = helper.substituteStringByObject(data.subject, data) diff --git a/src/services/JobCandidateService.js b/src/services/JobCandidateService.js index 724fc368..29f28d88 100644 --- a/src/services/JobCandidateService.js +++ b/src/services/JobCandidateService.js @@ -381,7 +381,10 @@ async function downloadJobCandidateResume (currentUser, id) { data: { jobCandidateUserHandle: handle, jobName: job.title, - applicationUrl: `${config.TAAS_APP_EARN_URL}?status=Active%20Gigs` + description: 'Client Viewed Resume', + notificationType: { + jobCandidateResumeViewed: true + } } }) diff --git a/src/services/NotificationsSchedulerService.js b/src/services/NotificationsSchedulerService.js index bd1157fb..8a7c288d 100644 --- a/src/services/NotificationsSchedulerService.js +++ b/src/services/NotificationsSchedulerService.js @@ -90,7 +90,6 @@ async function getDataForInterview (interview, jobCandidate, job) { const guestName = _.isEmpty(interview.guestNames) ? '' : interview.guestNames[0] const startTime = interview.startTimestamp ? helper.formatDateTimeEDT(interview.startTimestamp) : '' const jobUrl = `${config.TAAS_APP_URL}/${job.projectId}/positions/${job.id}` - const applicationUrl = `${config.TAAS_APP_EARN_URL}?status=Active%20Gigs` return { jobTitle: job.title, @@ -102,7 +101,6 @@ async function getDataForInterview (interview, jobCandidate, job) { startTime: startTime, duration: interview.duration, interviewLink, - applicationUrl, jobUrl } } @@ -176,7 +174,11 @@ async function sendCandidatesAvailableNotifications () { recipients: projectTeamRecipients, data: { teamName: project.name, - teamJobs + teamJobs, + notificationType: { + candidatesAvailableForReview: true + }, + description: 'Candidates are available for review' } }) @@ -245,7 +247,13 @@ async function sendInterviewComingUpNotifications () { sendNotification({}, { template: 'taas.notification.interview-coming-up-host', recipients: [{ email: interview.hostEmail }], - data + data: { + ...data, + notificationType: { + interviewComingUpForHost: true + }, + description: 'Interview Coming Up' + } }) sentHostCount++ @@ -258,7 +266,13 @@ async function sendInterviewComingUpNotifications () { sendNotification({}, { template: 'taas.notification.interview-coming-up-guest', recipients: interview.guestEmails.map((email) => ({ email })), - data + data: { + ...data, + notificationType: { + interviewComingUpForGuest: true + }, + description: 'Interview Coming Up' + } }) sentGuestCount++ @@ -324,7 +338,13 @@ async function sendInterviewCompletedNotifications () { sendNotification({}, { template: 'taas.notification.interview-awaits-resolution', recipients: [{ email: interview.hostEmail }], - data + data: { + ...data, + notificationType: { + interviewCompleted: true + }, + description: 'Interview Completed' + } }) sentCount++ @@ -422,7 +442,11 @@ async function sendPostInterviewActionNotifications () { data: { teamName: project.name, numCandidates, - teamInterviews + teamInterviews, + notificationType: { + postInterviewCandidateAction: true + }, + description: 'Post Interview Candidate Action Reminder' } }, webNotifications) @@ -521,7 +545,11 @@ async function sendResourceBookingExpirationNotifications () { teamName: project.name, numResourceBookings, teamResourceBookings, - teamUrl + notificationType: { + upcomingResourceBookingExpiration: true + }, + teamUrl, + description: 'Upcoming Resource Booking Expiration' } }, [webData])