Back Forward Correspondence — Concepts and terms

Concepts and terms

Your Pega 7 application can send messages to both other users and people who are not users of the system. Correspondence is the general term for letters, email, advices, forms, and similar materials that are sent to these parties.

Pega 7 can send correspondence through standard email gateways, fax, phone text (for Short Message Service phones), or print for conventional mail.

Adding correspondence to an application

Use these facilities to build correspondence into an application:

  1. Create a correspondence rule (Rule-Obj-Corr rule type) containing the body of the message for each correspondence type to be employed. The second key part of the correspondence rule, a correspondence type, identifies the medium of transport (such as email, postal mail, fax, or Short Message Service).
  2. Compose the body of the message. The HTML text in the correspondence rule can contain source HTML and JavaServer Page tags or directives. For example, the Include directive or include JSP tag can insert HTML from another correspondence rule, or from a correspondence fragment rule (Rule-Corr-Fragment rule type) into the current stream. The Reference directive or reference JSP tag can insert text from a clipboard value, to personalize the correspondence.
  3. Ensure that work parties who are to receive correspondence each have a contact preference and a corresponding address. For example, if the contact preference is email, an email address is required.
  4. Identify a point in a flow execution where the flow is to generate the correspondence message and the data needed in the message are available. Update the flow to include a Notify shape, a correspondence-related flow action such as Work-.Notify, or a Utility shape, as appropriate. Use a flow action when human input is needed to select the message, enter data values for the message, or edit the message.

Generation at run-time

As a flow execution advances, it can create correspondence automatically, notifying affected parties about the progress of the work item, needed information or signatures, and so on. The system tries to send correspondence using a medium and address recorded in recipient's contact preferences.

As with HTML rules, the system's stream processing facility evaluates the JSP tags or directives in the context of a user's current clipboard and RuleSet list.

Sent correspondence is linked to the work item as an instance of the Data-Corr-Email class. Unlike true work item attachments, correspondence is a permanent record and cannot be deleted or added once saved.

Sending correspondence

When correspondence is generated, it is queued for the Pega-ProCom agent, which periodically sends out correspondence.

Most correspondence is sent using email. Outgoing email is supported by an appropriately configured Data-EmailAccount data instance.

If the correspondence is to be printed or faxed (rather than sent as email), the HTML file (as a ZIP archive, with image files if any) is sent to a server running Windows and the Correspondence Output Server application. This application formats the resulting HTML file using the powerful capabilities of Microsoft Word, and then sends the results to a printer or fax-out board. The Pega-IntSvcs agent communicates to the Correspondence Output Server to send requests and monitor results.

See Headers for a discussion of changes to email headers in Pega 7.

Note that:

Localizing correspondence

An application can include versions of correspondence in multiple languages, even when the application itself hasn't been localized. For example, a standard email message can be translated into Spanish and German so users can correspond with customers (or other parties) in the language that the recipient prefers. By convention, the original version (in English, for example) is treated as a base rule, and the Spanish and German versions are circumstance-qualified based on a property such as pyCustomer.pyCountry. Thus, a customer in Germany receives the German version, and so on.

Standard activities

These standard activities support correspondence generation and sending:

Related topics About Email Account data instances
About the Email wizard
Understanding the Pega-ProCom agent
Understanding the Pega-IntSvcs agent
Standard rules Atlas — Initial Email Account data instances

UpConcepts