> For the complete documentation index, see [llms.txt](https://docs.growsurf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.growsurf.com/integrations/marketo.md).

# Marketo

Update/Add Marketo people with their unique share link and referrer information.

## Sync with Marketo

<details>

<summary>Before you connect GrowSurf to Marketo, create a Custom Service in your Marketo account. Click here to view step-by-step instructions.</summary>

Open up your Marketo account, then navigate to *Admin > Security > Users & Roles > Roles > Create New Role*. Then enter in the following information (reference the screenshot below):

* **Role Name**: GrowSurf
* **Description**: API Role specifically made for the GrowSurf Marketo integration.
* **Permissions**: Access API (35 of 35)

<img src="https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FnmUjnR9jSnTn9tA4quTu%2F00%20-%20Roles%2001.png?alt=media&amp;token=b61b2cfa-8353-4fb0-b1e4-271662d3d856" alt="" data-size="original">

Then navigate to *Admin > Security > Users & Roles > Users > Invite New User*. Then enter in the following information (reference the screenshot below):

* **Email**: `growsurf@yourcompany.com` (this can be replaced with any email address of your choosing)
* **First Name**: GrowSurf
* **Last Name**: Integration
* **Reason:** The Marketo user that will be used for the GrowSurf Marketo integration

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FDeJAYYUpJZrFf7lFkpAK%2F01%20-%20Users%2001.png?alt=media\&token=ee46ab66-fab4-4682-8237-14b3ac3b6418)

Then click the Next button. In *Step 2: Permissions*, set the following fields (reference the screenshot below):

* **Roles:** GrowSurf
* **API Only**: Enable this checkbox

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2Fiu78DtXEFB2GSi7ToSNK%2F02%20-%20Users%2002.png?alt=media\&token=5d5c5108-3988-4156-a7e2-8df1b752091d)

Then click the Next button. In *Step 3: Message*, click the Send button (reference the screenshot below).

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2Fnobmr521qMUW3K3jQFQK%2F03%20-%20Users%2003.png?alt=media\&token=3ca775fa-abb4-4b6b-81e4-c7aa5eaddfda)

Once you've added the new user, it's time to set up the custom service. Navigate to *Admin > Integration > LaunchPoint > New Service.* Then enter in the following information (reference the screenshot below):

* **Display Name**: GrowSurf
* **Service**: Custom
* **Description**: Service for the GrowSurf Marketo integration
* **API Only User**: `growsurf@yourcompany.com` (this should be the user that you set from the previous steps)

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FuoAZWmZiuhcEZMrGO7XU%2F04%20-%20Launchpoint%2001.png?alt=media\&token=7d9671c8-8f03-4135-9e7a-63364991d4f5)

Then click Create. Your service should now be available to view. Click on GrowSurf and write down the *Client ID* and *Client Secret* for later. Reference the screenshot below:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FJG9wvg2d3bJ4aIdIjh1l%2F05%20-%20Credentials%2001.png?alt=media\&token=d66f2a77-0ba3-439a-a5d1-e71cc43b5166)

Lastly, navigate to *Admin > Integration > Web Services.* Scroll to the REST API section and write down both URLs for *Endpoint* and *Identity*. Reference the screenshot below:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FaDzsg1MvWsOkconK3KyY%2F06%20-%20Credentials%2002.png?alt=media\&token=7d916bdd-7d04-4680-9d4a-241230249ee2)

**Need help?**

If you run into any issues during this setup phase, please see Marketo's Custom Services documentation [here](https://developers.marketo.com/rest-api/custom-services/) or reach out to GrowSurf support for assistance [here](https://app.growsurf.com/settings#contact_support).

</details>

**Step 1:** In *Program Editor > 4. Options > Integrations*, open the Marketo integration card and enter your [client ID and client secret](https://developers.marketo.com/rest-api/authentication/). Next, enter the [REST API Endpoint URL and Identity URL](https://developers.marketo.com/rest-api/base-url/).

{% hint style="info" %}
Connect Marketo before importing participants. If participants are already in your program, follow [these ESP sync options](https://support.growsurf.com/article/385-how-can-i-sync-my-growsurf-participants-to-my-esp) to send their GrowSurf data to Marketo.
{% endhint %}

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MgwHuAY0sCdy2G8pSE1%2F-MgwL7y53I7yi2c--5J8%2FScreen%20Shot%202021-08-12%20at%206.46.45%20PM.png?alt=media\&token=de1d6d52-162a-444c-877f-5851b1257684)

**Step 2:** Once connected, GrowSurf will add/update your Marketo people every time a new participant is added or referred to your referral or affiliate program.

**Step 3:** You should now see a screen that looks like the one below:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-Mh-SsV0Rm-yuOABlwUb%2F-Mh-uW2auBzziMTUVcAr%2FScreen%20Shot%202021-08-13%20at%204.07.06%20PM.png?alt=media\&token=209fb5eb-f258-4229-8a48-8dae60654c4c)

## Examples

[View our Marketo tutorials](https://docs.growsurf.com/additional-integrations/marketo/tutorials) to see different kinds of examples that you can copy/paste into your email templates.

## **Custom Fields**

GrowSurf will automatically create these new custom fields for your Marketo people.<br>

| **Field Name**                               | **Data Token**                                      | **Field Type** | **Description**                                                                                                                                                                                           | **Example**                                                |
| -------------------------------------------- | --------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| **GrowSurf Share URL**                       | `{{lead.GrowSurf Share URL}}`                       | Email          | The participant's unique referral link                                                                                                                                                                    | <https://growsurf.com?grsf=absc123>                        |
| **GrowSurf Participant ID**                  | `{{lead.GrowSurf Participant ID}}`                  | String         | The participant's unique GrowSurf ID                                                                                                                                                                      | abc123                                                     |
| **GrowSurf Referral Status**                 | `{{lead.GrowSurf Referral Status}}`                 | String         | The referral status of the participant\*                                                                                                                                                                  | `CREDIT_PENDING`                                           |
| **GrowSurf Participant First Name**          | `{{lead.GrowSurf First Name}}`                      | String         | The participant's first name                                                                                                                                                                              | Bob                                                        |
| **GrowSurf Participant Last Name**           | `{{lead.GrowSurf Participant Last Name}}`           | String         | The participant's last name                                                                                                                                                                               | Loblaw                                                     |
| **GrowSurf Referrer First Name**             | `{{lead.GrowSurf Referrer First Name}}`             | String         | The first name of the participant's referrer (if applicable)                                                                                                                                              | Gavin                                                      |
| **GrowSurf Referrer Last Name**              | `{{lead.GrowSurf Referrer Last Name}}`              | String         | The last name of the participant's referrer (if applicable)                                                                                                                                               | Belson                                                     |
| **GrowSurf Referrer Email**                  | `{{lead.GrowSurf Referrer Email}}`                  | Email          | The email address of the participant's referrer (if applicable)                                                                                                                                           | <gavin.belson@hoolie.io>                                   |
| **GrowSurf Total Referral Count**            | `{{lead.GrowSurf Total Referral Count}}`            | Integer        | The participant's all-time referral count                                                                                                                                                                 | 0                                                          |
| **GrowSurf Lead Count**                      | `{{lead.GrowSurf Lead Count}}`                      | Integer        | The participant's current lead count (pending referrals that have not converted yet)                                                                                                                      | 0                                                          |
| **GrowSurf Monthly Referral Count**          | `{{lead.GrowSurf Monthly Referral Count}}`          | Integer        | The participant's current month referral count                                                                                                                                                            | 19                                                         |
| **GrowSurf Previous Monthly Referral Count** | `{{lead.GrowSurf Previous Monthly Referral Count}}` | Integer        | The participant's previous month referral count                                                                                                                                                           | 200                                                        |
| **GrowSurf Next Milestone**                  | `{{lead.GrowSurf Next Milestone}}`                  | String         | The text for the next/upcoming milestone reward (only applies to milestone rewards. [See an example here](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-next-milestone))         | You are only 2 referrals away from winning a free t-shirt! |
| **GrowSurf Next Monthly Milestone**          | `{{lead.GrowSurf Next Monthly Milestone}}`          | String         | The text for the next/upcoming monthly milestone reward (only applies to milestone rewards. S[ee an example here](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-next-milestone)) | You are only 2 referrals away from winning a free t-shirt! |
| **GrowSurf Total Invite Count**              | `{{lead.GrowSurf Total Invite Count}}`              | Integer        | The participant's all-time invite count                                                                                                                                                                   | 112                                                        |
| **GrowSurf Total Impression Count**          | `{{lead.GrowSurf Total Impression Count}}`          | Integer        | The participant's all-time impression count                                                                                                                                                               | 150                                                        |
| **GrowSurf Language**                        | `{{lead.GrowSurf Language}}`                        | String         | The participant's program language (ISO code such as es or pt-BR)                                                                                                                                         | es                                                         |

\**GrowSurf Referral Status* can have one of these values:

* `CREDIT_PENDING`: The participant must trigger a referral before their referrer receives credit.
* `CREDIT_AWARDED`: The participant triggered a referral, and their referrer received credit.
* `CREDIT_EXPIRED`: The participant did not trigger a referral before the referral credit expired.

You can use these merge tags in your Marketo email templates. For example, use `{{lead.GrowSurf Share URL}}` to add each participant's unique referral link.

[Learn more about how to personalize Marketo emails here.](https://docs.marketo.com/display/public/DOCS/Personalize+an+Email)

## **Troubleshooting Tips**

* **If the new participant isn't being added to Marketo, or if they are being added but their unique referral link isn't being synced to Marketo:**
  * Check the participant's activity logs. GrowSurf retries failed syncs for up to 7 days.
  * There may be an issue with your Marketo permissions when the new Marketo Custom Service was created with the *API Role*. Disconnect the Marketo integration within GrowSurf, redo the Custom Service steps at the top of [this page](https://docs.growsurf.com/integrations/marketo#sync-with-marketo), then reconnect.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.growsurf.com/integrations/marketo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
