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.


Installatie afgerond

Bij het afronden van de laatste stap worden alle e-mails welk vanaf dat moment worden verstuurd of het gedrag welke vanaf dat moment plaats vinden (*ook in ouderere verzendingen) verstuurd naar het endpoint.

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;

Voorbeeld met verzendingsvariabelen

<!doctype html>
<html lang="nl" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta name="UniqueOfferId" content="{{manual field='UniqueOfferId' default='Vul hier het UniqueOfferId in'}}" />
<meta name="InteractionId" content="{{manual field='InteractionId' default='Vul hier het InteractionId in'}}" />
<title>Deployteq Example</title>
.........

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;

FieldnameDescriptionexample
*uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)21f37d1f-3525-4ebf-8142-74773dc7d9cd
*metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions)broadcasts
*metric_timestampActivity timestamp, unique for each activity (Unix timestamp)1562922481
*metric_idThe metric ID is a unique value per activity, only case of a broadcast the metric ID will be "0"0
external_idCustomer Externalid194076
customer_email_addressCustomer email addressa.vanderkleij@deployteq.com 
email_addressEmail address to which the mail is actually senta.vanderkleij@deployteq.com
email_domainDomain of the email addressdeployteq.com
customer_idDeployteq customer unique id, this ID is unique per brand.64561902
portal_idportal ID which us unique per Deployteq client1
brand_idBrandid for the brand within your Deployteq portal3
broadcast_idUnique broadcastid (unique per portal)2347
broadcast_typeMAIL and maybe SMS or PUSH in the futureMAIL
broadcast_event_typeType of broadcast; QUICKMAIL, SINGLEMAIL, CAMPAIGNMAILQUICKMAIL
sub_typeQUICKMAIL, QUICKSMS, SINGLEMAIL, SINGLESMS, CAMPAIGNMAIL, SMARTRUN, SPLITRUNQUICKMAIL
campaign_idUnique campaignid (unique per brand)22
campaign_nameName of the campaign in DeployteqNew customer journey
campaign_object_idCamaign object id from which the broadcast was sent1
content_idContentid for the used email content in Deployteq4
content_nameName of the email content in DeployteqM1 Introducing Deployteq
subjectSubject of the broadcast Welcome!
mailing_typeMailingtype, this could be an value the Deployteq administrator added to the settingsService
test_mailingBoolean if the broadcast is marked as a test mailingfalse
email_address_overrideBoolean 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_timestampUnix timestamp of when the broadcast is sent out1562922481
**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.


{
"UniqueOfferId": "/Service/Survey/Introduction_deployteq",
"InteractionId": "64057021488587867"
}

Additionele opmerkingen

* De UUID en Metric velden zijn uniek per bericht, dit houdt in dat ze bij een broadcast/open/click/bounce/complaint/unsubscribe en conversion een andere waarde zullen bevatten.
** De manual options bevatten alle handmatige variabelen welke zijn toegevoegd in de e-mail content. Voor de integratie zijn daarbij het `UniqueOfferId` en `InteractionId` verplicht om de data aan de zijde van Pega te kunnen verwerken. Zie Verzendingsvariabelen Pega.

Opens

Naast de basisgegevens is per open de volgende gegevens beschikbaar:

FieldnameDescriptionexample
uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)172278a9-dc7c-412c-bf94-1764be9fed55
metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions)opens
metric_timestampActivity timestamp, unique for each activity (Unix timestamp)1562922481
metric_idUnique ID for the metric 232
user_agentUser agent stringMozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko
osOS based on the openWindows
browserBrowser based on the openInternet explorer
machine_generatedBoolean if the email was opened by a machinefalse

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:

FieldnameDescriptionexample 1Example 2
uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)7dd53d3d-1b0f-4961-a076-b2a8d45e8ef608083017-dd92-4d18-8f22-a555cbb93c10
metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions), possible values for a click are: clicks or short_linksclicksshort_links
metric_timestampActivity timestamp, unique for each activity (Unix timestamp)15629224811562922481
metric_idUnique ID for the metric 345468
user_agentUser agent stringMozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like GeckoMozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko
osOS based on the clickWindowsWindows
browserBrowser based on the clickInternet explorerInternet explorer
urlThe URL the customer has clicked on, this can an external URL or Deployteq internal URLhttps://www.deployteq.com/welcome https://www.deployteq.com/welcome
altLink description/ALT tekst in DeployteqOnline surveyOnline survey
google_sourceIf 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_mediumIf 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_termIf 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_contentIf 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_campaignIf 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

tagsAn array of all the tags that has been configured for the URL

[
"Online Survey",
"Welcome program","2020"
]

[
"Online Survey",
"Welcome program","2020","Website"
]

Bounces

Naast de basisgegevens is per bounce de volgende gegevens beschikbaar:

FieldnameDescriptionexample
uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)ed0e18a4-bb7d-4fe7-b118-ed2898a3d79d
metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions)bounces
metric_timestampActivity timestamp, unique for each activity (Unix timestamp)1562922481
metric_idUnique ID for the metric 502
bounce_codeThe bounce code which has been communicated by the email provider5.4.4
bounce_reasonThe bounce reason which has been communicated by the email providerPolicy related
bounce_typeThe type of bounce: HARD or SOFTHARD
bounce_count_hard

The Hard bounce count, when this value is bigger then 0 the customer isn't mailable

1
bounce_count_softThe 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:

FieldnameDescriptionexample
uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)32f9964e-f78b-47d0-876c-38fc634a9816
metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions)complaints
metric_timestampActivity timestamp, unique for each activity (Unix timestamp)1562922481
metric_idUnique ID for the metric 699
complaintsThe complaint count1

Unsubscribes

Naast de basisgegevens is per unsubscribe de volgende gegevens beschikbaar:

FieldnameDescriptionexample
uuidUnique ID for each message, this is unique per activity (This UUID can't be regenerated afterwards)370ffb41-5c3a-45d6-a254-e24f6cde57b8
metricEmail activity (broadcasts, opens, clicks, short_links, bounces, complaints, unsubscribes, conversions)unsubscribes
metric_timestampActivity timestamp, unique for each activity (Unix timestamp)1562922481
metric_idUnique 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.

Broadcast
[
    {
        "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"
    }
]
Open
[
    {
        "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
    }
]
Click
[
    {
        "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"
    }
]
Bounce
[
    {
        "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"
    }
]
Unsubscribe
[
    {
        "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"
    }
]