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

In this blog article, we will see how we can notify the approval process through email and how to process the action through incoming email. This will be our second use case.

As a recap, below are the four use cases. I recommend visiting the posts in the following order to be on the same line.

  1. Create a case with the data from the incoming email 
  2. Use approval actions in the assignment notification, to update case automatically from the email service. This use case will use Subject data to identify the corresponding case ID
  3. Manage email conversations with the case. This use case will showcase how to use Message ID header to identify the corresponding case ID
  4. Handle delivery status notification messages. This use case will showcase, how we can use Thread-Topic field to identify the corresponding Case ID

It is also recommended to visit another blog article on email account –

Business scenario: Organization AAA which provides electronic repair service is using pega application for servicing the customer. If the spare parts amount exceeds a certain range, say $400 then an assignment is created for the Auditor to approve. Once approved the case continues to the next stage else the case will be resolved. In this scenario, Auditor will be provided access to pega application. Once a case requires approval, it will be routed to his name and he can approve the assignment from his list. The auditor will not be in pega portal 24 hours. Here we can make use of the assignment notification to send out an outbound email so that the approval action can be carried out through email?

To implement this we need to concentrate on 2 areas

  1. Outbound email – the email body with the approval actions.
  2. Inbound email – Once, approved or rejected, an incoming email will be coming to Pega. We need an email listener to process the incoming email

First, let’s do the configuration to send the outbound email from the assignment shape.

Configure outbound email

Step 1: Open your case and add the approval / Reject step.

I have routed the assignment an operator ID and enabled the email approval action. Assume Aarti stands for Auditor in this use case.

On clicking the email template you will see the default correspondence template. You can always override in your case class.

I will use the default corr template for approval actions

Step 2: Make sure the recipient operator rule form is updated with the email address. I already updated my operator ID record (auditor operator ID).

Step 3: Make an additional configuration that when rejected, the case should be resolved-rejected.

Step 4: Check if the email account test connectivity works fine.

Note: Make sure you enter a valid reply to – email address. This email address will be monitored by the email listener.

Create a new case.

I have created S-228

You can always click and open the mail from attachments.

Step 5: You should receive the mail in your inbox.

How simple and cool right 🙂

Step 6: I am going to test the negative flow. Click on Reject option.

Make note of the email subject with encoded / junk characters. The email subject is key to determine the corresponding case and approval process identification.

Configure inbound email

Step 1: We will use the same service email and same service activity. Before sending (step 6) the mail, make sure you removed the parameters for the service activity. The parameters are needed only when you want to create a new case. Save the rule.

Step 2: Trace open the service email rule and then send the email.

Now you see the long activity – pyCreateAndManageWorkFromEmail got executed.

Time to explore few activity steps

1. Step 3 and step 4 – decode the email subject ( we saw the junk characters before). Actually, the class of the case and the assignment details got encoded. The step retrieves the class and work ID prefix.

2. Step 16 – Opens the corresponding case.

3. Step 17.1 & 44– email attachment is added with the case.

4. Step 39 to 45 – An instance is queued to a standard agent – ProcessEmailRequest

Okay fine.

Now let’s check the case. Open the case S-228.

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

Successful demo!

As a recap on this use case

– As assignment (approval step) can be notified to the workparty or the assignee using outbound email. Standard correspondence template can be used for email body.

– The email recipient can either accept or reject the assignment and send out the reply mail

– An email listener can be used to receive the mail back and process the same using standard OOTB activity.

  • 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

  • Code Vault

Recent posts

  • Service REST – Usage and Configurations in Pega
  • Queue processor – Usage and Configurations
  • Data Pages Usage & Configurations in Pega
  • Requestor types in Pega
  • Case Locking Mechanism in Pega

Related Articles

Code Vault

Service Email Usage – Handle DSN

December 10, 2024 Code Vault Curators

In this blog article, we will see how we can handle delivery status notification messages. This article is created using Pega 7.4 version. There may some changes with the configuration in the latest versions. Please use this article only to understand the concepts Recap on the use cases. I recommend you to visit the articles […]

Code Vault

Service Email Usage – Manage Conversations

December 10, 2024 Code Vault Curators

In this blog article, we will see how we can manage the email conversations within Pega. This article is created using Pega 7.4 version. There may some changes with the configuration in the latest versions. Please use this article only to understand the concepts Recap on the use cases. I recommend you to visit the […]

Code Vault

Service Email Usage – Case Creation

December 10, 2024 Code Vault Curators

In the other articles, we saw, how to create a file listener, email account, service email using email wizard. The processing of all listeners in Pega is basic. The listener listens at a location for a message/file or email and invokes a service rule to process. Similarly, in email processing, the listener listens for an […]

Code Vault

Email Listener – Usage and Configurations in Pega

December 10, 2024 Code Vault Curators

This blog article will be the continuation of my previous article on email wizard. In this blog article, we will see in detail about all the configuration points in the email listener. What is email listener? The email listener monitors the email account on the configured folder and routes the email message to email service rule for […]

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