Skip to content

Instantly share code, notes, and snippets.

@narcisobenigno
Created June 6, 2024 03:00
Show Gist options
  • Save narcisobenigno/d22b2d2241a69e16236282847d933832 to your computer and use it in GitHub Desktop.
Save narcisobenigno/d22b2d2241a69e16236282847d933832 to your computer and use it in GitHub Desktop.

Intro

Our company has an intelligent calendar system using machine learning that identifies what is the best time to send emails to a specific customer. For example, customer Joe would be most receptive to emails that are sent on Mondays at 7 AM in the first half of January, and Tuesday at 11 AM in the remaining half of the month. This time varies depending on customer but each customer will receive an email periodically.

When a new customer is onboarded onto the system, we have to figure out what are the best times to communicate recurringly with them. Your assignment is to design a FollowUp system that periodically sends recurring emails to each customer.

Existing systems

The following are the existing systems that your FollowUp system will need to interact with in order to periodically communicate with customers. Consider these systems external to the FollowUp system you will be designing.

  • a Customer created queue

    • whenever a new customer is added to the system, this queue will receive a message with the customer ID
  • an AI Calendar service that returns the timestamp of the next best communication time for a given customer. You can expect this next best communication time to change, depending on when a request is made. Example:

    • request: { "customer_id": "customer-uuid-1" }
    • response: { "next_communication_time": "2021-11-01T10:00:00Z" }
  • a Email service that sends an email to a customer. Example:

    • request: { "customer_id": "customer-uuid-1" }
    • response: { "status": "200" }

architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment