App Push setup

Overview

This document explains the steps to integrate Eloqua App Push with an existing app.

Implementation recommended: This implementation is usually done using our professional services team, working directly with your app team. This is a one-off service which gets you up and running quickly & correctly

Here are the high level steps: Install the Firebase SDK:

  1. Install the Firebase SDK

  2. Send tokens to our API

  3. Optional: integrate analytics

Install the Firebase Cloud Messaging SDK and Retrieve the Token

We can support various client-side push libraries as a customization, but the simplest is Firebase Cloud Messaging. You basically just add their library. Specific instructions are available here:

Android
iOS
Android

Use this link to install the Firebase SDK for Android:

This guide explains how to register a subscription & access the token, which you will need to send back to us in the next section:

iOS

Use this link to install the Firebase SDK for iOS:

This guide explains how to register a subscription & access the token, which you will need to send back to us in the next section:

These need to be sent to our API, along with an email-address (or another identifier) to identify which contact the registration token represents.

post
Send Subscription Token

https://europe-west1-justaddfeatures-203400.cloudfunctions.net/pushSubscription?account=:account&token=:authToken
The token you get from Firebase needs to be sent to us, along with a contact-specific identifier (either email address or numeric ID).
Request
Response
Request
Query Parameters
account
required
string
Your account name/id
token
required
string
Your account-specific authorization key (contact your account manager if you're unsure what this is)
Body Parameters
FCM_token
required
string
This is a token supplied by Firebase. See the above section Install the Firebase SDK and Retrieve the Token.
id
optional
number
Numerical id of the Eloqua contact. You must include this or the email address.
email
optional
string
Email address of the contact. You must include this OR the numerical ID. This will be normalized (stored as lower-case, with any whitespace removed).
Response
200: OK
If successful, you will receive a 200 response and a status of "OK"
{ status: "OK" }
400: Bad Request
Invalid queries will return a 400 response:
{ error: "Error message here..." }

We deduplicate the tokens for you, so each device appears once

Sending Analytics Data (optional)

An optional extra step is to add a callback when notifications are clicked.

Sending us this data allows us to provide you with click analytics, and also to add custom activities to the contact showing app push notification clicks.

post
Send Analytics

https://europe-west1-justaddfeatures-203400.cloudfunctions.net/sendAnalytics
The body is a JSON array of objects (1 object per event). This can be an array of 1 object. The parameters of this object are as follows:
Request
Response
Request
Body Parameters
version
optional
integer
This refers to the split-test version. If there is no split-test, this will be 0. This can be obtained from the incoming message.
instance
required
string
This is the GUID for the specific instance of AppPush. This can be obtained from the incoming message.
campaign
required
number
The Eloqua Campaign ID. This can be obtained from the incoming message.
contact
required
number
The Eloqua Contact ID. This can be obtained from the incoming message.
type
required
string
In this application this is always click
app
required
string
In this application this is always premade_apppush
Response
200: OK

Implementing this API simply involves sending the incoming values that are attached to the push notification.

Send back the following fields from the push object you receive: app, type, contact, campaign, instance, version - plus two pre-defined values: type: "click", app: "premade_apppush "