> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gocertify.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Marketing Cloud

> Sync shopper data and verified community details from Gocertify into a Salesforce Marketing Cloud Data Extension.

When a shopper submits their email and/or mobile number, Gocertify adds a new row to a Data Extension in your Salesforce Marketing Cloud account, with the `state` column set to `consent-intent`.

When the shopper goes on to successfully verify as a target group (student, healthcare, senior, etc) and claims their offer, Gocertify adds a second row with the `state` column set to `offer-claimed`, including the verified group and the code they received.

With this data, you can build audiences of verified communities and start journeys from Gocertify activity.

> [!NOTE]
>
> You can choose to receive both rows, or only the `offer-claimed` row sent after the shopper completes their verification. Let your Customer Success Manager know which you prefer.

## Requirements to go live

To connect Salesforce Marketing Cloud with Gocertify, you'll need to:

* Create a **Data Extension** that Gocertify will write to
* Create an **Installed Package** with a server-to-server API integration
* Share the following with your Customer Success Manager:
  * **Client ID**
  * **Client Secret**
  * **Subdomain** (the first part of your Authentication Base URI)
  * **Data Extension External Key**

> [accordion] See step by step tutorial
>
> **1. Create the Data Extension**
>
> Sign into Salesforce Marketing Cloud and go to **Email Studio** > **Subscribers** > **Data Extensions** (or **Contact Builder** > **Data Extensions**). Create a new standard Data Extension with:
>
> * **Name**: `Gocertify` (or similar)
> * **External Key**: `gocertify` (or similar)
>
> Then add the fields below. The field names must match exactly.
>
> | Field | Data type | Length | Nullable | Description |
> | - | - | - | - | - |
> | `state` | Text | 20 | No | Either `consent-intent` or `offer-claimed` |
> | `email` | EmailAddress | 254 | Yes | The shopper's email, e.g. `sarah@example.com` |
> | `phone_number` | Text | 20 | Yes | The shopper's mobile number in E.164 format, e.g. `+447888888888` |
> | `type` | Text | 10 | Yes | Either `Code` or `Deal` |
> | `group_type` | Text | 100 | Yes | e.g. `Occupation` |
> | `group_parent` | Text | 100 | Yes | e.g. `Key Worker` |
> | `group_child` | Text | 100 | Yes | e.g. `NHS Worker` |
> | `coupon_code` | Text | 30 | Yes | The discount code given to the shopper, e.g. `ABC123456` |
> | `token` | Text | 10 | No | Gocertify's randomly generated identifier for the shopper's request, e.g. `ABCD1234` |
> | `campaign_id` | Text | 10 | No | The Gocertify campaign's identifier, e.g. `1234` |
> | `campaign_title` | Text | 255 | Yes | e.g. `20% OFF for Key Workers` |
> | `campaign_url` | Text | 255 | Yes | e.g. `https://secure.gocertify.me/at/your-brand` |
> | `origin_url` | Text | 1000 | Yes | The page on your site where the shopper started, e.g. `https://www.your-website.com/keyworkers` |
> | `date` | Date | - | No | When the event happened, in ISO 8601 format |
> | `message` | Text | 1000 | Yes | The complete consent text shown to the shopper, e.g. `Join the NHS newsletter...` |
>
> > [!WARNING]
> >
> > Do not set a Primary Key on this Data Extension. Gocertify sends up to two rows per shopper (one per `state`) that share the same `token`, so a Primary Key would cause the second row to be rejected.
>
> > [!NOTE]
> >
> > Empty values are not sent. `email` or `phone_number` will be missing when the shopper only shares one of them, `group_type` and `origin_url` might not be present, `coupon_code` is only set once an offer is claimed, and `message` is only sent with the `consent-intent` row. Keep these fields nullable.
>
> **2. Create an Installed Package**
>
> Go to **Setup** > **Platform Tools** > **Apps** > **Installed Packages** and click **New**. Give it a descriptive name like "Gocertify Integration".
>
> **3. Add an API Integration component**
>
> Inside the package, click **Add Component**, choose **API Integration** and then **Server-to-Server** as the integration type.
>
> In the permissions list, under **Data** > **Data Extensions**, enable **Read** and **Write**. These are the only permissions required.
>
> **4. Copy the credentials**
>
> Once the component is saved, copy the following from the package details:
>
> * **Client Id**
> * **Client Secret**
> * **Authentication Base URI**, which looks like `https://mc563885gzs27c5t9-63k636ttgm.auth.marketingcloudapis.com/`. The **subdomain** is the first part of it (`mc563885gzs27c5t9-63k636ttgm` in this example).
>
> **5. Share the credentials with Gocertify**
>
> Go to onetimesecret.com and paste the credentials there, in the format below. Even if it's not required, we encourage you to also add a random "Passphrase". This will generate a secret link that will expire within 7 days and will be visible only once. Once done, share this link with your Customer Success Manager at Gocertify.
>
> ```YAML Credentials placeholder theme={null}
> Client ID: xxxxxxxxxxxxxxxxxxxxxxxx
> Client Secret: xxxxxxxxxxxxxxxxxxxxxxxx
> Subdomain: mcxxxxxxxxxxxxxxxxxxxxxxxxxx
> Data Extension External Key: gocertify
> ```
>
> > [!TIP]
> >
> > If your Marketing Cloud account restricts API access by IP address, let us know. Gocertify can send all requests from static IPs for you to allowlist.

## How data will appear in Salesforce Marketing Cloud

Each event is added as a new row in your Data Extension. Rows are written asynchronously, so they can take a few moments to appear.

```json First row (consent-intent) theme={null}
{
  "state": "consent-intent",
  "email": "sarah@example.com",
  "phone_number": "+447888888888",
  "type": "Code",
  "group_type": "Occupation",
  "group_parent": "Key Worker",
  "group_child": "NHS Worker",
  "token": "ABCD1234",
  "campaign_id": "1234",
  "campaign_title": "20% OFF for Key Workers",
  "campaign_url": "https://secure.gocertify.me/at/your-brand",
  "origin_url": "https://www.your-website.com/keyworkers",
  "date": "2026-09-17T10:16:22Z",
  "message": "Join the NHS newsletter..."
}
```

```json Second row (offer-claimed) theme={null}
{
  "state": "offer-claimed",
  "email": "sarah@example.com",
  "phone_number": "+447888888888",
  "type": "Code",
  "group_type": "Occupation",
  "group_parent": "Key Worker",
  "group_child": "NHS Worker",
  "coupon_code": "ABC123456",
  "token": "ABCD1234",
  "campaign_id": "1234",
  "campaign_title": "20% OFF for Key Workers",
  "campaign_url": "https://secure.gocertify.me/at/your-brand",
  "origin_url": "https://www.your-website.com/keyworkers",
  "date": "2026-09-17T10:18:45Z"
}
```

Both rows for the same shopper share the same `token`, so you can use it to match the consent with the claimed offer.

> [!NOTE]
>
> Data is only sent for campaigns with data capture enabled, and only when the shopper chooses to share their email and/or mobile number with your brand.

## How to create audiences in Salesforce Marketing Cloud

Once you start receiving data from Gocertify, you can filter or query the Data Extension to build the audiences you need.

**Example audiences you can create:**

* **All verified shoppers** - rows where `state` = `offer-claimed`
* **Students** - rows where `state` = `offer-claimed` and `group_parent` = `Student`
* **Key Workers** - rows where `state` = `offer-claimed` and `group_parent` = `Key Worker`
* **Shoppers who shared their details but didn't finish verifying** - `consent-intent` rows whose `token` has no matching `offer-claimed` row

> [!TIP]
>
> You can also use the Data Extension as the entry source of a journey in Journey Builder, such as sending a welcome email when someone first verifies, or a reminder to shoppers who haven't claimed their offer yet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.