Met deze integratie worden alle Deployteq e-mailinteracties realtime verstuurd naar een REST API. Als vanuit Deployteq een e-mail wordt verstuurd of als klanten gedrag vertonen in de e-mail (opens, clicks, bounces, complaints, conversies of uitschrijvingen), dan wordt dit verstuurd naar de API, bijvoorbeeld Pegasystems. De integratie is opgezet op basis van een REST API koppeling met Basic authentication.
Installatie van de app
In de Deployteq store kan de Pega App worden geïnstalleerd;
Installatie stap 1 - Setup Endpoint
Bij het installeren van de App wordt gevraagd om de onderstaande gegevens;
- Endpoint
- Dit is de REST API url welke aangeroepen zal worden door Deployteq als een e-mailinteractie is geregistreerd
- Authenticatie
- Gekozen kan worden uit Basic Authentication of Oauth2.0
- Gebruikersnaam en wachtwoord
- Deze gegevens worden gebruikt voor basic authentication van de bovenstaande endpoint.
Installatie stap 2 - Interacties
In de tweede stap van de installatie kan worden aangevinkt welke e-mailinteracties gesynchroniseerd moeten worden:
Installatie stap 3 - Custom headers
Bij de derde stap is het mogelijk om eigen headers te definiëren welke per interactie worden toegevoegd aan het API verzoek.
Zie het onderstaand voorbeeld van een custom header welke is toegevoegd in de wizard:
In het API verzoek is de custom header zichtbaar:
Installatie stap 4 - Finance
In de laatste stap kan gekozen worden in welk termijn de facturatie van de App uitgevoerd moet worden en optioneel een PO-nummer worden opgegeven tbv de administratie. Bij het bevestigen van deze stap is de App volledig geïnstalleerd en wordt vanaf dat moment alle e-mail interacties realtime verstuurd.
Verzendingsvariabelen Pega
Om de gegevens aan de zijde van Pega te kunnen verwerken is het `UniqueOfferId` en `InteractionId` benodigd. Deze moeten als verzendingsvariabelen/manual fields worden toegevoegd aan de content, in de Deployteq handleiding kan meer informatie gevonden worden over verzendingsvariabelen: 1.6. Personalisatie in de e-mail
De verzendingsvariabelen kunnen voorzien worden van een waarde door het gebruik van een default waarde, als de content in het quickmail dialoog wordt geselecteerd of als de content wordt geselecteerd in het e-mail versturen campagne object. In het geval van de Pega implementatie verschilt deze waarde per verzending en wordt deze waarde vaak aangeleverd bij de start van de verzending, bijvoorbeeld door een Deployteq webhook welke wordt aangeroepen of door een CSV trigger bestand.
Hieronder een HTML voorbeeld waarbij de benodigde velden zijn opgenomen als meta-gegevens;
Gegevens uitwisseling
Voor iedere e-mail activiteit wordt een JSON bericht verstuurd naar Pega, in het geval van een bulk verzending wordt iedere verzending naar een klant als bericht verstuurd in de vorm van een broadcasts naar Pega. Iedere e-mail activiteit bestaat uit de standaard basisgegevens omtrent de verzending (broadcasts) en de ontvanger. Per activiteit bevat het bericht nog additionele gegevens over het vertoonde gedrag.
We onderscheiden de volgende activiteiten;
- broadcasts
- opens
- clicks: clicks & short_links
- bounces
- complaints
- unsubscribes
- conversions
Broadcast (basisgegevens)
Per verzending en in ieder andere activiteit worden de onderstaande gegevens verstuurd;
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 | deployteq.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 | 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
Naast de basisgegevens is per open de volgende gegevens beschikbaar:
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
Bij een click maken wij in Deployteq onderscheid in de activiteit `clicks` en `short_links`, dit heeft te maken met wijze waarop de link in de e-mail content is toegevoegd.
Naast de basisgegevens is per click de volgende gegevens beschikbaar:
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
Naast de basisgegevens is per bounce de volgende gegevens beschikbaar:
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
Naast de basisgegevens is per complaint de volgende gegevens beschikbaar:
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
Naast de basisgegevens is per unsubscribe de volgende gegevens beschikbaar:
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 Voorbeelden
Hier zijn een aantal voorbeelden van hoe de JSON in de calls eruit zien. De naam en inhoud van manual fields kunnen wijzigen, zie hiervoor de tabellen hierboven.
[
{
"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": "m.blom@deployteq.com",
"email_address": "m.blom@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": "deployteq.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"
}
]