With this integration you can send all your email interactions to Pega. This will be sent real time, so with every email sent, or link clicked, you will see this directly in your Pega application. This integration is based on the REST API integration with Basic Authentication.
Install the app
In the Deployteq Store you can install the Pega app yourself.
Install step 1
With the installation of the app, you will be asked for some information of your Pega account.
- Endpoint of the API
- This is the REST API url which Deployteq will push the interactions to.
- Username and password
- This information will be used for the authentication of the endpoint.
Install step 2
In the second step you can check which activities you want to be sent to the API:
Install step 3
The last step is the usual financial step. Here you can choose at which interval you want invoices and which PO number need to be used in the interface. When you complete this step the interactions will be send immediately from that point on.
Variables Pega
The variables `UniqueOfferId` and `InteractionId` can be added to your email templates to use the information correctly on the side of Pega. These variables can be added as manual fields. For more information on how to add variables to emails, you can check 1.6. Personalizing emails
When you have added the variables you can also add a default, when the variable is not given. Normally the contents triggered by Pega will have this information in the trigger which you can then use for the sending of the specific mail. In the mapping of the webhook you can map these fields to the same environment variables as you have added to the email.
This is an example of the HTML you can use in the meta-data of the email:
Data exchange
For every activity in the all emails send from your brand, Deployteq will send a JSON message to Pega. In case of a bulk send, all personal broadcasts will be sent separately to Pega. All calls have partly the same details and every activity has some extra details. For example, a broadcast has all the broadcast details and with an open, Deployteq can add browser details.
These are the activities we have in Deployteq;
- broadcasts
- opens
- clicks: clicks & short_links
- bounces
- complaints
- unsubscribes
- conversions
Broadcast (basic information about the send email)
With a broadcast, these details are sent:
Fieldname | Description | example |
---|---|---|
*uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | 21f37d1f-3525-4ebf-8142-74773dc7d9cd |
*metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions) | broadcasts |
*metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 |
*metric_id | The metric ID is a unique value per activity, only case of a broadcast the metric ID will be "0" | 0 |
external_id | Customer Externalid | 194076 |
customer_email_address | Customer email address | a.vanderkleij@deployteq.com |
email_address | Email address to which the mail is actually sent | a.vanderkleij@deployteq.com |
email_domain | Domain of the email address | teamitg.com |
customer_id | Deployteq customer unique id, this ID is unique per brand. | 64561902 |
portal_id | portal ID which us unique per Deployteq client | 1 |
brand_id | Brandid for the brand within your Deployteq portal (unique per portal) | 3 |
broadcast_id | Unique broadcastid (unique per portal) | 2347 |
broadcast_type | MAIL and maybe SMS or PUSH in the future | |
broadcast_event_type | Type of broadcast; QUICKMAIL, SINGLEMAIL, CAMPAIGNMAIL | QUICKMAIL |
sub_type | QUICKMAIL, QUICKSMS, SINGLEMAIL, SINGLESMS, CAMPAIGNMAIL, SMARTRUN, SPLITRUN | QUICKMAIL |
campaign_id | Unique campaignid (unique per brand) | 22 |
campaign_name | Name of the campaign in Deployteq | New customer journey |
campaign_object_id | Camaign object id from which the broadcast was sent | 1 |
content_id | Contentid for the used email content in Deployteq | 4 |
content_name | Name of the email content in Deployteq | M1 Introducing Deployteq |
subject | Subject of the broadcast | Welcome! |
mailing_type | Mailingtype, this could be an value the Deployteq administrator added to the settings | Service |
test_mailing | Boolean if the broadcast is marked as a test mailing | false |
email_address_override | Boolean if the override to an alternative receiver is set. customer_email_address will tell to which customer the mail would have been sent and email_address will tell to which address the mail is actually sent. | false |
broadcast_timestamp | Unix timestamp of when the broadcast is sent out | 1562922481 |
**broadcast_manual_options | Name- value pairs of manual variabels which has been set for the broadcast. In this case the manual options will contain the Pega required fields. | { |
Opens
Next to the basic information this will be send with an open
Fieldname | Description | example |
---|---|---|
uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | 172278a9-dc7c-412c-bf94-1764be9fed55 |
metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions) | opens |
metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 |
metric_id | Unique ID for the metric | 232 |
user_agent | User agent string | Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko |
os | OS based on the open | Windows |
browser | Browser based on the open | Internet explorer |
machine_generated | Boolean if the email was opened by a machine | false |
Clicks
In Deployteq we have a click and a short_link, this is a technical detail, which is based on how links are set up in the email or email template. Both is the click activity of a customer.
Next to the basic information, this information is available.
Fieldname | Description | example 1 | Example 2 |
---|---|---|---|
uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | 7dd53d3d-1b0f-4961-a076-b2a8d45e8ef6 | 08083017-dd92-4d18-8f22-a555cbb93c10 |
metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions), possible values for a click are: clicks or short_links | clicks | short_links |
metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 | 1562922481 |
metric_id | Unique ID for the metric | 345 | 468 |
user_agent | User agent string | Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko | Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko |
os | OS based on the click | Windows | Windows |
browser | Browser based on the click | Internet explorer | Internet explorer |
url | The URL the customer has clicked on, this can an external URL or Deployteq internal URL | https://www.deployteq.com/welcome | https://www.deployteq.com/welcome |
alt | Link description/ALT tekst in Deployteq | Online survey | Online survey |
google_source | If the Google source is set in Deployteq, this field will contain the value. This field will be empty if this value isn't set or embedded in the URL | ||
google_medium | If the Google medium is set in Deployteq, this field will contain the value. This field will be empty if this value isn't set or embedded in the URL | ||
google_term | If the Google term is set in Deployteq, this field will contain the value. This field will be empty if this value isn't set or embedded in the URL | ||
google_content | If the Google content is set in Deployteq, this field will contain the value. This field will be empty if this value isn't set or embedded in the URL | ||
google_campaign | If the Google campaign is set in Deployteq, this field will contain the value. This field will be empty if this value isn't set or embedded in the URL | ||
tags | An array of all the tags that has been configured for the URL | [ | [ |
Bounces
Next to the basic information, this information is available.
Fieldname | Description | example |
---|---|---|
uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | ed0e18a4-bb7d-4fe7-b118-ed2898a3d79d |
metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions) | bounces |
metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 |
metric_id | Unique ID for the metric | 502 |
bounce_code | The bounce code which has been communicated by the email provider | 5.4.4 |
bounce_reason | The bounce reason which has been communicated by the email provider | Policy related |
bounce_type | The type of bounce: HARD or SOFT | HARD |
bounce_count_hard | The Hard bounce count, when this value is bigger then 0 the customer isn't mailable | 1 |
bounce_count_soft | The Soft bounce count, when this value is bigger then 4 the customer isn't mailable. This value can be reset if a customer opens/clicks in a previous received email or when the email address is changed within Deployteq. | 0 |
Complaints
Next to the basic information, this information is available.
Fieldname | Description | example |
---|---|---|
uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | 32f9964e-f78b-47d0-876c-38fc634a9816 |
metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions) | complaints |
metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 |
metric_id | Unique ID for the metric | 699 |
complaints | The complaint count | 1 |
Unsubscribes
Next to the basic information, this information is available.
Fieldname | Description | example |
---|---|---|
uuid | Unique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards) | 370ffb41-5c3a-45d6-a254-e24f6cde57b8 |
metric | Email activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions) | unsubscribes |
metric_timestamp | Activity timestamp, unique for each activity (Unix timestamp) | 1562922481 |
metric_id | Unique ID for the metric | 725 |
JSON examples
These are some JSON examples on what the request will look like. Please note that the name and value of the manual fields will vary. See the variables Pega for the details
[
{
"portal_id": 1746,
"portal_name": "mokup",
"brand_id": 1,
"brand_name": "Mok-Up",
"metric": "broadcasts",
"metric_id": 0,
"metric_timestamp": 1589354145,
"customer_id": 13,
"external_id": "",
"campaign_id": 24,
"campaign_object_id": 3,
"broadcast_id": 722,
"broadcast_timestamp": 1589354143,
"broadcast_type": "MAIL",
"broadcast_event_type": "EMAIL",
"broadcast_manual_options": {
"campagne": null,
"CustomerCount": 1,
"paul": null,
"__selectionEnvironment": "environment",
"billing_address_formatted": "",
"shipping_address_formatted": ""
},
"sub_type": "CAMPAIGN",
"content_id": 339,
"email_domain": "teamitg.com",
"mailing_type": "",
"test_mailing": false,
"email_address_override": false,
"campaign_name": "webhook order confirmation",
"content_name": "Order confirmation",
"subject": "Bedankt voor je bestelling",
"customer_email_address": "person@deployteq.com",
"email_address": "person@deployteq.com",
"uuid": "63eb020f-1784-4e20-9cc9-ea5404f57c9e"
}
]
[
{
"portal_id": 1746,
"portal_name": "mokup",
"brand_id": 1,
"brand_name": "Mok-Up",
"metric": "opens",
"metric_id": 691,
"metric_timestamp": 1589801661,
"customer_id": 13,
"external_id": "",
"campaign_id": 75,
"campaign_name": "",
"campaign_object_id": 3,
"broadcast_id": 719,
"broadcast_timestamp": 1589295496,
"broadcast_type": "MAIL",
"broadcast_event_type": "EMAIL",
"broadcast_manual_options": {
"Campagne": null,
"CustomerCount": 1,
"E-mailadres": null,
"ProductJSON": null,
"__selectionEnvironment": "environment",
"billing_address_formatted": "",
"cartURL": null,
"paul": null,
"shipping_address_formatted": ""
},
"sub_type": "CAMPAIGN",
"content_id": 339,
"content_name": "",
"subject": "",
"email_domain": "teamitg.com",
"mailing_type": "",
"test_mailing": false,
"email_address_override": false,
"customer_email_address": "",
"email_address": "",
"uuid": "c69cc862-5c43-4a84-bc53-d38bfac8fb5c",
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/81.0.4044.138 Safari\/537.36",
"os": "Windows",
"browser": "Chrome",
"machine_generated": false
}
]
[
{
"portal_id": 1746,
"portal_name": "mokup",
"brand_id": 1,
"brand_name": "Mok-Up",
"metric": "clicks",
"metric_id": 417,
"metric_timestamp": 1589813526,
"customer_id": 13,
"external_id": "",
"campaign_id": 24,
"campaign_name": "",
"campaign_object_id": 3,
"broadcast_id": 718,
"broadcast_timestamp": 1589295496,
"broadcast_type": "MAIL",
"broadcast_event_type": "EMAIL",
"broadcast_manual_options": {
"CustomerCount": 1,
"__selectionEnvironment": "environment",
"billing_address_formatted": "",
"campagne": null,
"paul": null,
"shipping_address_formatted": ""
},
"sub_type": "CAMPAIGN",
"content_id": 339,
"content_name": "",
"subject": "",
"email_domain": "teamitg.com",
"mailing_type": "",
"test_mailing": false,
"email_address_override": false,
"customer_email_address": "",
"email_address": "",
"uuid": "f7747985-f93d-432e-a6aa-0c429a25f159",
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/81.0.4044.138 Safari\/537.36",
"link_id": 17786,
"url": "https:\/\/www.mokupshop.com\/customer\/account\/",
"alt": "Menu - Your account",
"google_source": "",
"google_medium": "",
"google_term": "",
"google_content": "",
"google_campaign": "",
"tags": [
],
"os": "Windows",
"browser": "Chrome"
}
]
[
{
"portal_id": 1746,
"portal_name": "mokup",
"brand_id": 1,
"brand_name": "Mok-Up",
"metric": "bounces",
"metric_id": 1,
"metric_timestamp": 1589813730,
"customer_id": 458,
"external_id": "",
"campaign_id": 0,
"campaign_object_id": 0,
"broadcast_id": 724,
"broadcast_timestamp": 1589813724,
"broadcast_type": "MAIL",
"broadcast_event_type": "SINGLEMAIL",
"broadcast_manual_options": {
"billing_address_formatted": null,
"shipping_address_formatted": null
},
"sub_type": "SINGLEMAIL",
"content_id": 339,
"email_domain": "jnkdfjnkwefj.com",
"mailing_type": "",
"test_mailing": false,
"email_address_override": false,
"bounce_type": "hard",
"bounce_code": "5.1.2",
"bounce_reason": "other",
"bounce_count_hard": 1,
"bounce_count_soft": 0,
"uuid": "50eaaa33-cdf2-4d9d-83d0-97b88b2517ed"
}
]
[
{
"portal_id": 1746,
"portal_name": "mokup",
"brand_id": 1,
"brand_name": "Mok-Up",
"metric": "unsubscribes",
"metric_id": 4,
"metric_timestamp": 1589814299,
"customer_id": 2,
"external_id": "",
"campaign_id": 0,
"campaign_object_id": 0,
"broadcast_id": 725,
"broadcast_timestamp": 1589814127,
"broadcast_type": "MAIL",
"broadcast_event_type": "SINGLEMAIL",
"broadcast_manual_options": {
"billing_address_formatted": null,
"shipping_address_formatted": null
},
"sub_type": "SINGLEMAIL",
"content_id": 347,
"email_domain": "hotmail.com",
"mailing_type": "",
"test_mailing": false,
"email_address_override": false,
"uuid": "3413400a-aaef-4c6f-bdc7-9fabafa9500a"
}
]