Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This entry provides information about DIY (do-it-yourself) integrations which allow you to setup and maintain DMP outbound integrations (i.e. pushing audiences to any 3rd party execution platform).

Contents of the Table

Table of Contents


Definitions

  • DMP: Data Management Platform
  • DIY integration: do-it-yourself custom integration mechanism
  • Endpoint: URL that is used to connect to the DIY integration

...

Responsibilities

DMP
  • Send notification on the creation of a new audience.
  • Send mutations of users being appended to an audience.

...

By default we create a new Audience ID (in the above example a5940e473cea659.356693871497425011). You can however also ignore that and return us with your own ID, or forward the ID created in the 3rd party system. We will then use that ID in subsequent "Add to Audience"-calls which reduces the need for maintaining a mapping in your service. In order to do that you need to return a JSON key "id" in your 200 OK response, like 

Code Block
{"id":"12345"}

Add to Audience / Remove from Audience

During creation of a new segment audience change in the system a POST request will be executed with a JSON payload (Content-Type: application/json).

Please be aware of the fact that the Mutation array will likely contain multiple entries for users being added/removed to one or multiple audiences. This micro-batching mechanism is configured to send once it contains 100 users, or when 1 second is past: whatever comes first. This configuration is subject to change at any point in time without prior notification. 

We recommend to process those mutations in parallel to reduce the latency of your endpoint given the response time requirements. In addition it may be advisable to put the received JSON payloads after in a message queue (in Google that would be PubSub, in AWS that may be SQS) and process them asynchronously in the background. That allows you to quickly respond after validating the payload and headers, while still allowing you for enough time to forward the request to the 3rd party system. 

Example Add: POST https://my-endpoint.com/?type=ADD_TO_AUDIENCE

Code Block
{
    "Type": "ADD_TO_AUDIENCE",
    "Mutations": [{
        "Uuid": "ab043529-3e55-4672-52f0-18887ea12345",
        "Audience": "a5940e473cea659.356693871497425011",
        "Customer": 123,
        "Platform": 113,
        "External_user_id": "12478286329"
    }]
}

Example Remove: POST https://my-endpoint.com/?type=REMOVE_FROM_AUDIENCE

Code Block
{
    "Type": "REMOVE_FROM_AUDIENCE",
    "Mutations": [{
        "Uuid": "ab043529-3e55-4672-52f0-18887ea12345",
        "Audience": "a5940e473cea659.356693871497425011",
        "Customer": 123,
        "Platform": 113,
        "External_user_id": "12478286329"
    }]
}

...

Once the DIY integration has been finalised it needs to be activated for the relevant client(s). This must be done in the DMP instance of the client. Go to Settings > Integrations > Mapp Self-Service and provide the requested details as described here.

Example

Below an example of a DIY integration. Note: This example uses Google Cloud Functions

...

  • Trigger: Choose HTTP Trigger
  • Source code: Upload the zip provided under the link above
  • Function to execute: diy . This is the name of the function in index.js that is going to be executed for each incoming HTTP-request
  • Stage bucket: Select a Google Cloud Storage bucket where the uploaded zip can be saved. You can either select an existing bucket or create a new on.
  • For all other fields choose as you see fit

...