Close Menu
MyKnowTech
    MyKnowTech
    • Technical Blogs
    • Career
    • Partner Spotlight
    • Videos
    • Pega News
    • Services
    LinkedIn YouTube Facebook
    MyKnowTech
    Code Vault

    Service Email Usage – Approval Flow

    Editorial TeamBy Editorial TeamDecember 10, 2024Updated:May 31, 2026No Comments4 Mins Read
    Share LinkedIn Telegram Email WhatsApp Copy Link

    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.

    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
    Editorial Team

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

    Related Posts

    Code Vault

    Sending Outbound Emails from Pega

    March 2, 2026
    Code Vault

    Service Email Usage – Handle DSN

    December 10, 2024
    Code Vault

    Service Email Usage – Manage Conversations

    December 10, 2024
    Code Vault

    Service Email Usage – Case Creation

    December 10, 2024
    Code Vault

    Email Listener – Usage and Configurations in Pega

    December 10, 2024
    Code Vault

    Microsoft Graph Email Account in Pega

    December 10, 2024
    Code Vault

    Process Incoming Emails in Pega

    December 6, 2024
    Search through the blog
    Tags
    activity Advanced authentication background-processing Beginner case-management Constellation data-model declarative-processing email-processing file-processing Integration pega-core-concepts pega-integration process reporting security system-administration user-interface validation
    Pega Courses

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

    About

    MyKnowTech is a boutique Pega enablement and consulting firm – helping organizations build internal Pega capability through structured training programs, Centre of Excellence setup and hands-on architecture guidance.

    Company
    • About
    • Leadership
    • Career
    • Contact
    Resources
    • Technical Blogs
    • Career
    • Partner Spotlight
    • Videos
    • Pega News
    • Services

    ©  MyKnowTech B.V. All Rights Reserved.

    • Sitemap
    • Terms & Conditions
    • Privacy Policy