Register
Submit a solution
Status: ‌Cancelled client request

Challenge Overview

This is the 500 points Medium level problem of Topcoder Skill Builder Challenge: Salesforce Apex. For more challenge context info Register for the Host Competition before submitting a solution to this problem.

Problem Statement: Corona Cases Email

Now that you sent the welcome emails to all the customers (Contacts). But for the new Contact, besides the general greeting messages, you need to include the COVID-19 cases info in the email text.

Technology Stack

In all the three Skill Builder competitions, you need to develop the app by Visual Studio Code with Salesforce Extension Pack, and you need to create a Salesforce project by the Salesforce CLI. You cannot just write the code in the Developer Console of your Org.

All the code should be deployed to a Scratch Org, and you need to include the link to the Scratch Org, username and password in your submission.

You will need to install the DreamHouse app into your Scratch Org, and all the following development will be based on it.

What do you need to do?

Now that you sent the welcome emails to all the customers (Contacts). But for the new Contact, besides the general greeting messages, you need to include the COVID-19 cases info in the email text.

1. For Contact, You need to add a custom field Interested Country/Region (API name: Interested_Country_Region_c) with Type Text (Up to 3 characters).
2. We can add Country Code in the field.
3. For any contact who filled the Interested Country/Region, you need to send an email to him/her.
4. For the new Contact who filled the Interested Country/Region, you need to send an email to him/her as well.
5. You should implement 3, 4 by Apex Trigger.
6. For all the Contacts who filled the Interested Country/Region, you need to send the email on a daily basis, you should implement it by Apex Scheduler.
7. The email content should include

  • The customer name
  • The total stats around the globe of today
    • Total confirmed cases
    • Current infected cases
    • Recovered cases
    • Deaths
  • The stats of his/her interested country/region of today
    • Total confirmed cases
    • Current infected cases
    • Recovered cases
    • Deaths
8. You should use the following email template to send emails.

Hi <Customer Name>,

Thanks for your interest in the property of <interested country/region>. We kindly send you the latest Corona cases of <The date of today>.

<The total stats around the globe of today>

<The stats of his/her interested country/region of today>

We are launching a new site http://www.dreamhouseapp.io/ to help you explore the houses at home. If you have any questions, feel free to contact the broker: <Randomly show one broker name and phone number, e.g., Victor Ochoa: 617-244-3672>

Hope you stay safe and healthy.

Sincerely,
DreamHouse Realty
<The date of today>

You need to replace the placeholder with the actual value in the email template. You can use EmailManager.sendEmail to send the email.

Important things to note

  • Configure the language of your Scratch Org to English if it is not.
  • The reviewer will log in to your Scratch Org and check.

Instructions:

  • We have prepared three problems: Easy, Medium, and Hard, which are worth 250, 500, 1000 points respectively. Points are based on the difficulty of the problem.
  • The competitions may or may not be related to each other.
  • The links to the problems/competitions are provided below.
  • Each problem has one single requirement to achieve. We will judge your submission based on the requirement being fulfilled in each problem, so as long as the requirements are met with minimal code quality, you would be rewarded with points for that particular problem.
  • Here is the leaderboard with individual problem score and total score across weeks is available.

Problems

  1. Easy: 250 Points :: Welcome emails
  2. Medium: 500 Points :: Corona Cases Email
  3. Hard: 1000 Points :: Web Service and Test Automation


Final Submission Guidelines

  • The source code of your Salesforce project.

  • Deployment guide and validation document. You need to include the link to the Scratch Org, username and password in the document, and mention how to verify the trigger and scheduler.

  • A demo video to verify that your submission meets all the requirements (Optional).

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30141544