Skip to main content

Requirements

All channels
  • client_id
  • client_secret
  • Instance subdomain (e.g. mc563885gzs27c5t9-63k636ttgm)
Email channel (additional)
  • definition_key — created during email setup below
Aampe calls the SFMC server-to-server REST API on your behalf using OAuth 2.0 client credentials. Tokens are fetched and cached automatically — you only need to supply the client ID and secret.
The access token SFMC issues expires after 20 minutes. Aampe handles token refresh automatically — do not share access tokens directly.

Step 1 — Create an Installed Package

  1. Log in to SFMC and open Setup (gear icon, top right).
  2. Under Platform Tools, expand Apps and select Installed Packages.
  3. Click New and name the package aampe-integration.
  4. Under Components, click Add Component and select API Integration.
  5. Select Server-to-Server as the integration type.
  6. Grant the following permissions:
ScopePermissionRequired for
EmailRead, Write, SendEmail sends
PushRead, Write, SendPush sends
ChannelsRead, WriteChannel access
AutomationsRead, Write, ExecuteTracking Extract jobs (email only)
  1. Click Save.
  2. Copy the Client ID, Client Secret, and REST Base URI from the package summary page. These are the credentials you will enter in Aampe.
Your REST Base URI will be in the format https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com — only the subdomain portion is required.

Step 2 — Push channel setup

No additional SFMC configuration is required beyond the Installed Package above. Enter the following into your Aampe integration settings:
  • client_id
  • client_secret
  • subdomain
  • message_id — the SFMC push message ID Aampe should send against

Step 3 — Email channel setup

Email requires three one-time setup steps in SFMC.

3a — Create the shell template in Content Builder

Aampe generates the full HTML email body per user and passes it at send time. The Content Builder template acts as a thin delivery wrapper — Aampe owns all content and styling.
  1. In SFMC, go to Content Builder and click Create > Email > HTML Paste.
  2. Name it aampe-email-shell.
  3. Set the subject line to:
    %%=AttributeValue("subject")=%%
    
  4. Set the body to:
    <!DOCTYPE html>
    <html>
    <head></head>
    <body>
    %%=TreatAsContent(AttributeValue("msg_body"))=%%
    <!-- Add your standard unsubscribe footer here -->
    </body>
    </html>
    
  5. Replace the comment with your organisation’s unsubscribe footer. The built-in SFMC profile centre link can be used:
    <a href="%%profile_center_url%%" alias="Unsubscribe">Unsubscribe</a>
    
  6. Save the template.
TreatAsContent() evaluates the passed HTML as live content. Aampe automatically escapes %% sequences in message bodies to prevent unintended AMPscript evaluation.

3b — Create a send definition

  1. Create a send definition referencing the shell template from step 3a. See createSendDefinition.
  2. Ensure options.tracking has opens and clicks set to true — these are required for Aampe’s reward signal.
  3. Copy the Definition Key and enter it into your Aampe integration settings.
One send definition is sufficient for all Aampe email sends — you do not need one per campaign or segment.

3c — Configure Tracking Extracts for event data

Aampe reads delivery events (sent, opens, clicks, bounces, unsubscribes) via daily Automation Studio Tracking Extracts.
  1. In Automation Studio, create a new Automation.
  2. Add a Tracking Extract activity for each event type: Sent, Opens, Clicks, Bounces, Unsubscribes.
  3. Set the output destination to S3 or SFTP.
  4. Schedule the automation to run daily.
The messageKey field in the extract output is the join key between SFMC tracking rows and Aampe send records — ensure it is included in the extract schema. See Tracking Extract reference.
You are all set with SFMC!