When configuring an email account, you must select your email provider from a list
available in the Account provider section. You can also configure your
application to add an email provider that is not included in the default list.
Note: Pega Customer Decision Hub provides a built-in Custom provider type for easy
configuration of less critical email accounts. However, the Custom provider type does not
allow organizations to define custom headers. In addition, bounce and delivery events for
emails sent from a Custom-type account are not recorded in interaction history. Because of
that, for business-critical email accounts, it is a best practice to add a new email provider,
as described below.
In Pega Customer Decision Hub, create a new class with the parent class as
PegaMKT-Data-EmailServiceProvider.
In the email provider control panel, configure the webhook URL.
Webhooks are callback URLs that are invoked when an event occurs. For example, a
webhook is called when and email is delivered, or when it bounces. For more information
about webhooks, see your email provider documentation.
In Pega Customer Decision Hub, configure the required extension data transforms:
SetupCustomHeader
This data transform is used to add custom headers to the email. It must populate
the following properties:
CustomHeaderName - This is the custom header required by
your email provider. Check the email provider documentation to get the header
name.
IsESPClass – Must be set to true.
This is used to indicate email provider classes.
Optional: CondenseHeaders – Set this property
to true if your email provider requires additional
processing of the headers.
Example configuration of the SetupCustomHeader data transform
This data transform is required for the callback URL to bring in data from a
webhook. It detects and normalizes email delivery and bounce events, so that they
can be saved in interaction history.
Define a service to process the email delivery and bounce events from the email
provider.
The service must invoke the NormalizeResponseData data transform,
as well as the CaptureBounceInfo activity, as in the following
figure:Example configuration of a service to process email events
Bounced emails are recorded in the mkt_bounce_details
interaction history table. Pega Customer Decision Hub records the customer ID, bounce
time, bounce reason, and error message.
Optional: If you want to record bounced emails in the customer's profile, ensure that the
customer class has external mapping of an exposed column to the
IsBounced property.