Back Forward More about Service Email rules

About Service Email rules

Email conversations

The standard Service Email rule EmailDefault.Work-.CreateEmailFlow (and the associated service activity Work-.ProcessInboundEmail) support email conversations. When appropriately configured, each email correspondence contains a unique identifier (in the message header) associated with the originating work object ID. A reply to that email also contains that ID. The ProcessInboundEmail activity attaches the email to the work object.

Standard properties for data mapping the request

The Work- base class has a Page mode property named pyInboundEmail. The page class of this property, Embed-Services-InboundEmailInfo, provides standard properties that represent the individual components of email messages: to, from, subject, body, date, and so on. When the purpose of your email service is to create new work objects or to manage delivery failure messages for correspondence generated during flow processing, you and the Email Accelerator can use these standard properties to map email data directly to the clipboard without having to create additional properties.

When you use the accelerator to generate email services, it configures the following inbound mappings:

You can also use .pyInboundEmail.Date for mapping the value from the Date field.

Standard properties for data mapping DSN data

The Embed-Services-InboundEmailInfo class also provides standard properties that represent the individual components of Delivery Status Notification messages. You can use the following standard properties to map DSN data directly to the clipboard without having to create additional properties:

Standard HTML rules for data mapping the response

When the service activity is finished with its processing, the email service sends the response configured on its Response tab through the email listener. If another email message is sent at a later point in the flow processing, that message is managed by an outbound email account and not by the email listener.

The Work- base class has two standard HTML rules that you can use for the service rule’s response:

When you use the Email Accelerator to generate email services, it uses these standard HTML stream rules in the response. You can edit the stream rules or change the outbound mapping as necessary.

Attachments to incoming email

If an incoming email message contains attachments, the email listener creates a page named pyAttachmentPage of class Data-ServiceMessage and puts the attachments on that page. When you use the Email Accelerator to create an email service that creates work objects, the generated service activity automatically extracts the files from the pyAttachmentPage and uses them as work object attachments.

If you create an email service without using the Accelerator, and you want the service to use the attached files as work object attachments, configure the service activity to handle work objects. For information, see the Pega Developer Network article PDNPRKB-24059 How to save an incoming email message as a work object attachment using Email Service rules.

To test arriving email attachments for software viruses, override the extension point activity Data-WorkAttach-File.CallVirusCheck with an activity that calls your third-party virus software. Your activity can call a Java class or (in a Microsoft Windows server) a Dynamic Linked Library routine.

Testing

To test outbound email, run through the entire flow (Run> Run Process > flow name) and then verify that notify and other email messages are delivered the way you expect them to be.

To test inbound email, start with the listener. From the listener form, click the Test Connectivity button to ping the email server. Then use the System Management application to verify that the listener is running. Open the email service rule and use the Run Rule feature to run it. Finally, from the external application, send a request message to the inbox monitored by the email listener. Then check the inbox of the external application to determine whether the response message arrived and whether it contains the information you expected.

See also the Pega Developer Network document PDNTesting Services and Connectors for information.

Definitions service, remote logging
Related topics About Email Listener data instances  
About Email Server data instances   
About Email Account data instances   
About Requestor Type data instances
Standard rules Atlas — Standard Service Email rules

UpAbout Service Email rules