In an email listener if we are using a different subject for the mail,how to accomodate this change in email listener?

An email was being sent with a subject to the email listener but all of a sudden we have a requirement to change this subject,how can we do that in an email listner.Like now the new emails will come up with changed subject.

To adjust the subject line for your email listener, you’ll need to make a few tweaks to the Service Email rule that handles your incoming messages.

  1. Find your Service Email rule: Start by locating the Service Email rule currently used by your email listener.
  2. Go to the Request tab: Open that rule and navigate to the Request tab.
  3. Turn on the subject override: Look for the checkbox labeled Override default subject formatting and select it. This tells Pega to ignore the default pyGetInboundEmailSubject activity, giving you control over the subject line.
  4. Set up your custom subject: In the configuration area that appears, you can define how you want the subject to look using one of these approaches:
    • Keep it simple: Just type your text directly as plain text.
    • Use quotes: If you want to include quotes in your subject line, wrap your text in double quotes and use a backslash to escape any internal quotes (for example: "The brand new \"Product Name\" is here!").
    • Add dynamic data: You can mix text with property data by using the plus sign to connect them (for example: "Hi " + .Customer.pyFullName + ", a new \"Product\" awaits you!").

If you need something more advanced than simple text or property references, you can click the Expression Builder icon next to the subject field to build out more complex logic.

Hi @GiridharanVenkat thank you so much for your explanation however can you tell me where to configure the custom subject?as on clicking this configure icon an OOTB activity is there.Please find screenshots attached

@GiridharanVenkat can this be achieved if we configure a text analyzer in pega?i am just exploring this NLP i.e text analyzer option as well like if it can be done or not?

Subject handling logic should be done on Service Email layer, NOT Listener

Open Service Email → Service tab → Activity

In the service activity, read pyInboundEmail.pySubject and then update logic to handle new subject