You are developing a new ecommerce website for your company. You want customers to receive a customized email notification when they place an order. You need to configure this email service while minimizing deployment effort. What should you do?
A.
Create a Cloud Function that is triggered by a create type event in Firestore,
B.
Create an email-sending application hosted on Compute Engine that is invoked by an HTTP request.
C.
Create an email notification channel, and set up an alerting policy that is based on log metrics from a create type event.
D.
Use Pub/Sub to send an email when the orders/ API returns an HTTP response of 200 OK.
Using Cloud Functions triggered by a create event in Firestore allows you to easily integrate email notifications with your ecommerce order processing flow. When a new order is created and stored in Firestore, the Cloud Function is automatically invoked. Within the function, you can implement the logic to send a customized email (using an email provider like SendGrid, Mailgun, etc.). This approach minimizes deployment effort and management overhead because Cloud Functions are fully managed and event-driven.
Option A is the most streamlined solution compared to running a Compute Engine instance (Option B), setting up alerting based on logs (Option C), or using Pub/Sub based solely on an HTTP response (Option D), which aren’t as well-suited for sending custom, timely customer emails.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Sandesh24
2 months ago