Logo
  • Products
    • SecOps Studio
  • Solutions
    • Pega Stack Shifter
  • Services
    • Pega Enablement
    • Pega Modernization
  • About
  • Contact
  • Blog
Code Vault

Service Email Usage – Approval Flow

December 10, 2024 Code Vault Curators

This second article in our series focuses on a powerful automation feature: Email Approvals. We will explore how to notify users of a pending approval via email and, more importantly, how Pega processes their “Approve” or “Reject” reply to move the case forward automatically using the same Service Email rule.

As a recap, we are navigating through four core use cases. I recommend following them in order to get the complete picture:

  1. Case Creation: Generate a case from an incoming email.
  2. Email Approvals: Automate case updates using Subject line data to identify the Case ID. (Current Post)
  3. Conversation Management: Use Message-ID headers to link replies to cases.
  4. DSN Handling: Manage delivery failures using the Thread-Topic field.

Business Scenario: Organization AAA, an electronics repair provider, uses Pega to manage service requests. If a spare part cost exceeds $400, the case requires an Auditor’s approval. Since the Auditor isn’t logged into Pega 24/7, we want to send an email notification that allows them to approve or reject the request directly from their mobile device or desktop email client.

To implement this, we must configure two components:

  1. Outbound Email: The approval request sent from Pega containing action links.
  2. Inbound Email: The listener that captures the Auditor’s reply and processes the action.

Part 1: Configure Outbound Email

Step 1: Add the Approval Step Open your Case Life Cycle and add an Approve/Reject step. Route this to the Auditor’s operator ID and enable the Email approval option.

Pega provides a default correspondence template for this. While you can override it in your case class, the standard template works perfectly for this use case.

Step 2: Update Operator Records Ensure the Auditor’s Operator ID record has a valid email address. Without this, Pega won’t know where to send the notification.

Step 3: Configure Post-Action Logic In the Approve/Reject step, configure the “If Rejected” path to resolve the case as Resolved-Rejected.

Enjoying this content?

Access the author’s full video courses here at MyKnowAcademy.

Explore Courses →
Author

Step 4: Verify Email Connectivity Check your Email Account rule and run a “Test Connectivity.”

Pro Tip: Ensure the Reply-To address is valid and identical to the one your Email Listener is monitoring.

Step 5: Create a Test Case Create a new case (e.g., S-228). You should see the outbound email appearing in the case attachments and, shortly after, in your personal inbox.

Step 6: Test the Negative Flow Open the email in your inbox and click Reject. You will notice the reply email has a subject line filled with encoded “junk” characters. Do not delete these. This encoded string is the key Pega uses to identify exactly which case and assignment you are responding to.

Important note: This encoded signature in later versions can be found in the email body as well!!

Part 2: Configure Inbound Email

Step 1: Adjust the Service Activity We will use the same Service Email rule from our first use case. However, ensure you remove any parameters from the service activity if you were previously using them for case creation. For updates, the encoded subject handles the identification.

Step 2: Trace and Send Open the Tracer on your Service Email rule and hit “Send” on your reply email. You will see the heavy-duty activity pyCreateAndManageWorkFromEmail spring into action.

Key Activity Steps to Watch:

  • Steps 3 & 4: These steps decode that “junk” subject line to retrieve the Case Class and Work ID prefix.
  • Step 16: Opens the specific case (S-228) in the background.
  • Steps 17.1 & 44: Attaches the reply email to the case for auditing.
  • Steps 39 to 45: Queues the request to the standard Pega agent: ProcessEmailRequest.

Note: For the case to actually advance, the ProcessEmailRequest agent must be running on your node.

The Result

Check case S-228. You will see the status has updated to Resolved-Rejected automatically, and the assignment has been cleared—all without the Auditor ever logging into the Pega portal!

Note: Make sure the agent ProcessEmailRequest is up and running in your node.

Summary of Use Case 2:

  • Assignments can trigger outbound emails to work parties using standard correspondence templates.
  • Recipients can click simple links to Approve or Reject, sending a reply with a unique encoded subject.
  • Listeners use OOTB activities to decode that subject, open the case, and advance the workflow.
  • email-processing
Code Vault Curators

A technical team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.

Post navigation

Previous
Next

Pega Courses

Pega courses can be accessed at https://myknowacademy.com

Search through the blog

Tags

activity authentication background-processing case-management data-model declarative-processing email-processing file-processing pega-core-concepts pega-integration process reporting security system-administration user-interface validation

Categories

  • Career
  • Code Vault
  • Insight

Recent posts

  • Should Experienced Pega Professionals Still Go for Pega CLSA Certification?
  • My Honest Take on Pega Constellation
  • Different Ways to Create Cases in Pega at Runtime
  • Career Advice for Pega Developers – Upskilling in 2026
  • Standard Queue Processing Vs Dedicated Queue Processing in Pega

Related Articles

Code Vault

Sending Outbound Emails from Pega

March 2, 2026 Editorial Team

In this blog article, we will see how we can send an outbound email from a Pega application. This is the continuation of the previous blog article, where we created an Microsoft Graph Email Account in Pega Requirement: As soon as a new Mortgage request is created, the case manager should be notified about the […]

Code Vault

Service Email Usage – Handle DSN

December 10, 2024 Code Vault Curators

In this final installment of our series, we will explore how to manage Delivery Status Notification (DSN) messages within Pega. Note: This article was developed using Pega 7.4. While specific configurations may vary in newer versions, the fundamental concepts remain applicable. Series Roadmap To fully grasp the progression of Pega email integration, consider reviewing the […]

Code Vault

Service Email Usage – Manage Conversations

December 10, 2024 Code Vault Curators

In this blog article, we will explore our third use case: Managing Email Conversations within Pega using Service Email Note: This article was created using Pega 7.4. While configurations may differ in more recent versions, the core concepts remain the same. Series Recap To get the most out of this series, I recommend visiting these […]

Code Vault

Service Email Usage – Case Creation

December 10, 2024 Code Vault Curators

In the previous articles, we explored how to create a file listener, an email account, and a service email using the Email Wizard and this article we will create a new case using Service Email The fundamental processing logic for all listeners in Pega is consistent: the listener monitors a specific location for a message, […]

About

MyKnowTech was born with a mission to bridge the gap between technical expertise and business needs. We are a boutique firm specializing in Pega solutions, delivering them with a personal touch. At the heart of our philosophy is a commitment to putting clients first.

Company
  • About
  • Leadership
  • Career
  • Contact
Resources
  • Blog
  • Services
  • Solutions
  • Insights

©  MyKnowTech B.V. All Rights Reserved.

  • Sitemap
  • Terms & Conditions
  • Privacy Policy