Boost your study routine with flows and email-to-text gateways

Boost Your Salesforce Certification Study Routine with Flows & Email-to-Text Gateways | Automate This!

By

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Bradley Condon built the Test Me Now subscription service to provide a seamless and interactive practice exam experience for Salesforce Certification preparation. Bradley’s solution leverages automation to streamline exam selection, deliver practice questions, and provide users with real-time feedback—helping learners prepare effectively while showcasing the power of Salesforce Flow.


Problem: Staying consistent with certification preparation

Studying for Salesforce Certifications can be a daunting task, especially when trying to balance it with a busy work schedule or life’s other demands. Many of us struggle to find the time or motivation to maintain a consistent study routine, which is key to success when preparing for exams. Traditional methods, such as setting calendar reminders or using to-do lists, often lack engagement and can easily be ignored. Additionally, it’s hard to find an efficient way to receive practice questions and get instant feedback without having the exam material on hand.

This challenge leaves many admins looking for a convenient, flexible way to keep their study routine on track regardless of what curve balls life throws them.

Solution: Automate studying, no matter how busy the admin

To solve this problem, Salesforce Admins can automate their study routines by using a combination of flows, email-to-text gateways, and email-to-case. The end result is automation that sends a daily practice exam question via text message. Reply to the text with your answer whenever it’s convenient to get your result and overall practice exam score. Learn new skills in building the automation while reviewing the ones you already know!

Here’s a high-level explanation of what I built.

  • A screen flow allows users to sign up for the text alerts via an Experience Cloud site.
  • A scheduled flow is used to send the daily question to subscribers.
  • Finally, Service Cloud’s Email-to-Case is paired with a record-triggered flow to process replies when users text back their answers. The automation checks whether their responses are correct to provide feedback and their score.

You can build the automation for yourself, or for others to utilize. This flexibility opens the door for various use cases beyond Salesforce Certification preparation.

For instance:

1. Daily task reminders
Use the automation to send personalized task or project reminders to individuals or teams. Users can respond with task updates, which are then tracked and logged for progress monitoring.

2. Appointment scheduling and follow-ups
Businesses can leverage this automation to schedule and confirm appointments, send reminders, or follow up with clients and customers. Responses can trigger actions like updating a calendar or sending confirmation emails.

3. Learning and development tips
Deliver daily professional development tips, motivational content, or step-by-step learning guides. Users can engage with these prompts to help reinforce productivity and personal growth.

4. Customer support and ticket follow-ups
Service teams can automate follow-ups for open cases or tickets. Customers receive a status update or next steps and can respond to escalate or close the case directly.

5. Personal productivity boosters
Individuals can automate self-improvement reminders, such as sending daily wellness tips, journaling prompts, or habit trackers. Responses can help log progress or provide motivation to stay on track.

By adapting the core functionality, the automation can cater to a wide variety of goals, from business operations to personal growth, making it a versatile solution for users across industries.

Set up objects and fields

As Salesforce professionals progress in their careers, they tend to acquire multiple certifications. Because each exam evaluates exam takers on different topics, we will want to keep the questions as well as their preparation progress separate from one another. To accomplish this, we use the standard Contact and Case objects along with three custom objects (Subscription, Certification Exam, and Question).

Visual representation of how the Contact, Case, Subscription, Certification Exam, and Question objects relate to each other.

The five objects are interconnected in a way that allows for managing and tracking practice exam interactions for Salesforce Certifications. The Contact object represents individual users who are engaging with the certification content. Each contact can be linked to multiple subscriptions through a Master-Detail relationship. The subscription acts as a junction object, connecting Contact and Certification Exam objects. This setup enables a many-to-many relationship, meaning a single contact can subscribe to multiple certification exams, and each certification exam can be associated with multiple contacts. The Subscription object holds key information, such as the number of questions answered and the correct answers by the contact, which helps in calculating a score through a formula field.

On the other side of the relationship, the Certification Exam object connects to the Question object, which holds the details of individual exam questions. The Question object includes fields for the question itself, the correct answer, and multiple answer options. Additionally, the object will feature a question number field to maintain the sequence of questions and an Is Active checkbox field to control which questions are currently available for distribution.

Prepare Lightning email templates

Since we’re using email-to-text gateways to send our text messages, we need to create email templates to be used within our flows later—specifically Lightning Email Templates. Creating the emails within the flow or as Classic Email Templates limits us in how we format our messages. The eight email templates are required to meet all of our needs.

For each email template, add the message that you would like to send in the text message. Use merge fields to bring in relevant data. Below is an example of how to configure the Daily Question template.

The Daily Question record page on the Email Template object.

Add and verify the org-wide email address

For each certification exam you offer, you need a dedicated org-wide email address. These addresses serve as the "from" address when sending text messages, and it’s the unique identifier for receiving responses from subscribers.

  1. From Setup, search for and select Organization-Wide Addresses.
  2. Click Add.
  3. Fill in the following details:
    • Display Name: [Certification Name]
    • Email Address: Enter a unique email (for example, adminexam@yourdomain.com).
    • Purpose: Select System Email.
  4. Click Save.
  5. Check the email address for an email from Salesforce with a link to verify the Org Wide Email Address.
  6. Repeat these steps for each certification exam you plan to offer. Make sure to record these email addresses; you'll need them when setting up the case queues, email-to-cases, and Certification Exam records later.

The Organization-Wide Email Addresses section within Setup.

Pro Tip: Create a naming convention for your email addresses. This makes it easy to identify the certification each address is associated with (for example, adminexam@yourdomain.com, platformappbuilder@yourdomain.com).

Create a case queue and establish Email-to-Case

To handle incoming text responses, we need to set up case queues as well as Email-to-Case routing addresses. Here's how to set these up.

Create Case Queues

  1. From Setup, search for and select Queues.
  2. Click New.
  3. Fill in the following:
    • Label: [Certification Name]
    • Queue Email: Enter your verified Org-Wide Email Address you created earlier for the exam.
    • Supported Objects: Select Case.
    • Queue Members: Select Yourself.
  4. Save and repeat for each certification exam you'll offer.

Enable Email-to-Case (if needed)

  1. From Setup, search for "Email-to-Case".
  2. Click Enable Email-to-Case.
  3. Check the following boxes:
    • Reply with new content only
    • Enable on-demand service

Set up Email-to-Case Routing Addresses

  1. From Setup, search for "Email-to-Case".
  2. Under "Routing Addresses", click New.
  3. Configure each routing:
    • Routing Name: [Certification Name]
    • Email Address: Enter your verified Org-Wide Email Address you created earlier for the exam.
    • Case Owner: Select the corresponding queue you created.
    • Case Origin: Email
  4. Click Save.
  5. Check the email address for an email from Salesforce with a link to verify the routing address.
  6. Salesforce will provide an Email-to-Case routing address. Hint: Copy and paste this rather than typing it in to avoid typos.
  7. Set up email forwarding from your Org-Wide Email Address to the provided routing address (steps will vary based on your email provider).
  8. Repeat for each certification exam.

This ensures that cases are being created and assigned to the correct queues before proceeding with the rest of the implementation.

Information banner advising users to test each routing address by sending a test email to their Org-Wide Email Address.

Use a screen flow for exam sign-up

In this section, we explore the implementation of a screen flow within an Experience Cloud site. There are a few key items we accomplish with this flow.

  1. Collect the information to create the contact (if they aren’t a contact already).
    • First Name
    • Last Name
    • Phone Number
    • Cell Phone Carrier (This will make sense shortly.)
  2. Obtain the Certification Exam that they want to prepare for.
  3. Provide the visitor with a way to accept any Terms & Conditions and inform them that any standard text messaging rates may apply.
  4. Subscribe the contact and send them a welcome text to confirm that they are successfully subscribed along with instructions on how to unsubscribe once they no longer want to receive the text messages.

A vertical flowchart showing a Salesforce screen flow process.

Let’s break this down, step by step.

Since we need to collect information from the user and will place it on the Experience Cloud site, we choose a screen flow.

1. Use a Get Records element to "Get Certification Exam"

We’re grabbing all the certification exams that are active.

2. Use a Screen element to "Collection Information"

Next, we use a Screen element to collect the user’s first name, last name, phone, mobile provider, exam, and acceptance of the terms and conditions.

We use a text template to show the certification image on the exam setup page.

How to view HTML code in plain text format within a text template editor. The interface shows an HTML img tag in the body field and highlights the 'View as Plain Text' dropdown option, illustrating how to edit HTML content directly.

We want to capture the user’s acceptance of the terms and conditions. To do this, we also use a text template.

A text template creation screen showing terms and conditions content in a rich text editor. The template is named 'TermsAndConditionsTextTemplate' and includes basic text formatting tools.

Here’s our Screen element where we gather the data. We use a checkbox labeled {!AdministratorImage} in an exam selection section of a Screen element. This checkbox is outlined in orange to emphasize its connection to the previously shown HTML text template.

A checkbox labeled {!AdministratorImage} in an exam selection section of a Screen element

The end result: the 'Test Me Now!' subscription form showing how the previously configured 'AdministratorImage' HTML element renders as a styled exam selection option. Additionally, the terms and conditions are shown underneath the certification selection.

Final implementation view of a 'Test Me Now!' subscription form showing how the previously configured 'AdministratorImage' HTML element renders as a styled exam selection option. This view represents the final user-facing interface of the flow-building process.

After the setup of our initial Screen element with the form fields and exam selection options, we need to handle the contact creation and management process.

3. Use a Get Records element to "Search for Existing Contact"

  • This searches the Salesforce CRM database using the phone number provided in the form.
  • It checks if we already have this contact in our system.

4. Use a Decision element "Was a Contact Located" with two paths

If Contact Located:
Simply assign the existing contact record to a variable for later use.

If Contact Not Located:

CASE(
   {!Mobile_Provider},
   "AT&T Mobility", {!Phone.value} & "@txt.att.net",
   "Verizon", {!Phone.value} & "@vtext.com",
   "T-Mobile", {!Phone.value} & "@tmomail.net",
   "Sprint", {!Phone.value} & "@messaging.sprintpcs.com",
   "BellSouth", {!Phone.value} & "@bellsouth.cl",
   "Boost Mobile", {!Phone.value} & "@sms.myboostmobile.com",
   "Consumer Cellular", {!Phone.value} & "@cingularme.com",
   "Cricket", {!Phone.value} & "@sms.cricketwireless.net",
   "MetroPCS", {!Phone.value} & "@mymetropcs.com",
   "US Cellular", {!Phone.value} & "@email.uscc.net",
   {!Phone.value} & "@vmobl.com"
)

Note: This formula combines the user's phone number with their carrier's email gateway domain, creating an address that will convert emails to SMS messages.

5. Use an Assignment element to assign the contact to the variable

If the contact is located, we will assign that contact to a contact record variable for use later in our flow.

6. Use the Create Records element to create the new contact record

If the contact does not exist in the system, we will create the contact record in this step.

7. Use a Get Records element to fetch other contact fields

This ensures we have all the necessary information for the subscription process.

8. Create a Decision element "Selected Exam" with three paths

  • Administrator
  • AI Specialist
  • Platform App Builder

9. Use a Get Records element to "Get X Exam"

Each decision path includes its own "Get Exam" record lookup to retrieve the appropriate exam details.

10. Use a Get Records element "Locate an Existing Subscription"

This checks if the contact already has an active subscription.

11. Use a Decision element "Was a Subscription Located"

This step determines whether a subscription was found or not.

If Subscription Found:

  • (12) Display "AlreadySubscribedScreen" using a Screen element that informs the user that they already have a subscription created for that exam and that if they unsubscribed but would now like to re-subscribe, they can simply send RESUME in the original text message conversation.

If No Subscription:

  • (13) Create new subscription record.
    • Assign the contact and certification exam fields using the contact record variable that we stored our two possible scenarios in and the get certification exam that was assigned based on the exam decision path.
    • (14) Get the “Welcome Email” email template.
      • Filter the email template using the name of your welcome email template.
    • (15) Use a Send Email action to send the welcome email.
      • Email Template Id: ID of the get email template record
      • Recipient Id: ID of your contact record variable
      • Related Record Id: If your email template uses merge fields other than from the contact object, use that record’s ID.
      • Sender Address: This is the org-wide email address that you can grab from the certification exam record or the subscription record.
      • Sender Type: OrgWideEmailAddress (All one word using the capitalization shown here)
    • (16) Display a success message using a Screen element.
      • This confirms to the users that they have been successfully subscribed to a practice exam and to expect a text with additional information.

Use a schedule-triggered flow to update the daily question and send it to subscribers

To provide users with a rotating set of questions that accurately reflect the weighting of the exam objectives, we use a schedule-triggered flow that runs daily. Because we want the questions to rotate on each exam, our trigger is the Certification Exam object. The only requirement is that the exam is active/available.

Flow showing the process of updating the active question; triggers daily at 11:45 PM.

Before we begin to update any questions, we first want to count the number of questions currently available for the exam. This is done by retrieving all of the questions for the exam, looping through the collection of records, and incrementing the number variable by one until the last question successfully exits the loop. By doing this, we ensure that questions are reset to the beginning of the rotation when the last question arrives. For example, if a certification exam has 45 questions and the current “active” question is 45, we will want to deactivate question 45 and activate question 1. A majority of the time, however, the new active question will just be the previously active question plus one.

With the questions for each exam now all updated, we can send out the daily questions. We do this with a different schedule-triggered flow that runs daily shortly after our first scheduled flow. Don’t have too much of a delay between the two scheduled flows or else you risk a user replying to a question that may no longer be the active question.

This last scheduled flow runs for every subscription that is currently active. It’s a very simple flow that gets the active question record for the exam that’s listed on the subscription. After that, it’s a simple Get Records element to locate the ID of the email template we will use and the Send Email action that helps us deliver it to the contacts.

Schedule-triggered flow showing the process of sending a practice exam question to all active subscribers.

Handle text responses using a record-triggered flow

The last flow is probably my favorite because it really makes you think about those “what if” scenarios. It’s our record-triggered flow that handles the text responses received by all of our subscribers.

When a user replies to the text message, it will be sent to our Salesforce org as an email to the org-wide email address associated with the certification exam that they are preparing for. Since we’ve set up the email as an email-to-case routing address, it will be converted into a case. Sounds great—right!? It sure does! There is a twist, however...

When the case is created, the email address that we receive the contact’s answer from isn’t the same one that we used to send the question to. In the example below, notice how we saved the contact record with an email address of 8889995423@vmobl.com; however, we received their reply from +18889995423@vmobl.com.

A case record with an overlay of a contact record. Sections are highlighted to show that the emails do not match exactly.

For our contact to be associated to the contact record on the case, we need to update the case to receive the email message from the email we saved to the contact record. We accomplish this by using a record-triggered flow on the Case object. The only flow element required is an Update Records element where we will update the triggering record’s supplied email field using the formula below.

A record-triggered flow in Salesforce, starting with the Case object, triggered when a record is created. The flow includes an Update Records element to update the supplied email address.

This formula uses the RIGHT and LEN functions on 'Record.SuppliedEmail.

The 'Edit Formula' dialog in Salesforce for 'EmailFormula'; shows a formula using RIGHT and LEN functions on 'Record.SuppliedEmail.

This Update Records element links the contact with the case, making it a lot easier for us to work with.

We have another record-triggered flow that handles the response process. The flow includes steps for retrieving contact and subscription records, updating cases, and processing different reply categories such as answered questions, unsubscribes, and resubscribes. It shows decision points for correct and incorrect answers, assignments for email templates, and actions for sending text message responses and closing cases.

Flow diagram illustrating a record-triggered flow for handling responses in a Salesforce automation process. The flow includes steps for retrieving contact and subscription records, updating cases, and processing different reply categories such as answered questions, unsubscribes, and resubscribes. It shows decision points for correct and incorrect answers, assignments for email templates, and actions for sending text message responses and closing cases.

The flow starts by using the contact record from the case and the email address that received the email to locate our subscription. Use the $Record > Owner ID (Group) > Email when filtering for the org-wide email address on the subscription. We locate the subscription in order to make the necessary changes to the record based on the response we received (update score, unsubscribe, or re-subscribe).

Sometimes we receive an email where a subscription cannot be located (junk mail). It’s best practice to include a fault path to handle them as you see fit. In this example, I send an email to myself as the system administrator letting myself know that a case was created without a subscription to link to so that I can manually check the message and close the case.

For times when a subscription is located, there are four types of responses we may receive from someone.

  1. An answer to a practice question (“A”, “B”, or “C”)
  2. Someone requesting to unsubscribe (“STOP”)
  3. Someone asking to re-subscribe (“RESUME”)
  4. Invalid replies (Anything other than what is listed above)

The Decision element in our flow evaluates the case description to determine which path it takes.

If they provided one of the multiple choice options, the flow needs to locate the active question for the certification exam in the subscription record and evaluate their response to the value in the Correct Answer field. If they were correct, we use an Assignment element to increment the value by one for both the Correct Answers and Questions Answered fields. If they were incorrect, the Assignment element only increments the value by one in the Questions Answered field.

Should the user reply with “STOP”, we uncheck the Subscribed field so they no longer receive practice questions. If they reply with “RESUME”, we do the opposite. Before the paths rejoin, they each search for an email template record by filtering off of the name of the template to use and assign it to an EmailTemplateToSendId variable.

Finally, the Send Email action sends an email/text message to the contact and closes the case.

But wait, there’s more. I turned it into an agent!

Agentforce is the future. I accepted the challenge to see how to transform my implementation into a Service Agent. While I don’t have time to go into how I did this, you can watch the video at the 17:54 min mark to see how I made my solution into an autonomous agent.

Your turn: Make Test Me Now truly yours

Test Me Now isn’t just about functionality—it’s about creating a solution that feels uniquely yours. From customizing the visual design to align with your brand to delivering information through a channel that works best for you and your users, Salesforce provides the flexibility to fit your unique needs and style.

When I created Test Me Now, I needed a study routine that was both consistent and adaptable. I wanted a platform that not only provided structure but also allowed for personalization—because no two users or organizations are the same. With Salesforce, I was able to build a solution that addressed my own needs and demonstrated how others can create something that works for them.

Now it’s your turn. Take Test Me Now as a starting point, and make it your own. Customize the look and feel, tailor the features, and mold it into a solution that works seamlessly for your use case. Whether it’s gamifying assessments, streamlining employee training, or enhancing certification prep, you have the tools and the platform to bring your vision to life.

So, what will you build? Let’s turn your ideas into reality.

Resources

Want to see more good stuff? Subscribe to our channel!

SUBSCRIBE TODAY
Leverage Prompt Builder and Flow Builder to automate data creation

Leverage Prompt Builder and Flow Builder to Automate Data Creation | Automate This!

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, learn how Erick Mahle leverages Prompt Builder […]

READ MORE
Increase productivity and create starter flows fast with Einstein for Flow

Increase Productivity by Creating Starter Flows Fast Using Einstein for Flow | Automate This!

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, learn how Eduardo Guzman enhanced productivity and […]

READ MORE