You need to send a customized email to customers when they place an order in your new ecommerce site while minimizing deployment effort. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a Cloud Function triggered by Firestore document create events..
Why this is the answer
Creating a Cloud Function triggered by Firestore document create events is the most efficient solution. When a new order is placed, a document is likely created in Firestore. This trigger automatically invokes your Cloud Function, which can then execute code to send a customized email using an email API (e.g., SendGrid, Mailgun). This approach is serverless, minimizing deployment and operational effort. Hosting an email-sending app on Compute Engine would require managing a server, increasing deployment and maintenance overhead. An email notification channel and alerting policy are for operational alerts, not for sending customized customer emails. Using Pub/Sub to send an email when an API returns HTTP 200 OK is less direct; while Pub/Sub could be part of a larger asynchronous system, directly triggering from the Firestore document creation is simpler and more aligned with the requirement.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed