# Marketo

HockeyStack's Marketo integration pulls your marketing automation data from Marketo and connects it with the rest of your customer data. This includes Leads, Campaigns, Programs, and the key activities you track through Marketo.

## Connecting to Marketo <a href="#block-6ef774aaacaa43d48fa2081cd05c5768" id="block-6ef774aaacaa43d48fa2081cd05c5768"></a>

Before you can connect your Marketo account to HockeyStack, we need some additional information:

* Your Marketo API Endpoint
* Your Client ID
* Your Client Secret

Follow this guide on how to find these information:

[How to Find Your Marketo Account Details](https://docs.hockeystack.com/integrations/marketing-automation/marketo/how-to-find-your-marketo-account-details)

Once you have these information, you can enter them to HockeyStack’s connection dialog in Atlas > Ingest. HockeyStack can then automatically create the necessary authentication and connection flow.

## How It Works <a href="#block-774ef4e36e0e4a18b90aa34a59ebff4f" id="block-774ef4e36e0e4a18b90aa34a59ebff4f"></a>

When you integrate Marketo, HockeyStack pulls certain actions and properties from it. Each action comes with action properties that give more information about it.

For a full list of the objects and related actions we pull from Marketo, see [Marketo Pulled Actions List](https://docs.hockeystack.com/integrations/marketing-automation/marketo/marketo-pulled-actions-list).

## Leads <a href="#block-001f48ce33c245da9f58cb52f13158f3" id="block-001f48ce33c245da9f58cb52f13158f3"></a>

Before HockeyStack start pulling the Leads from Marketo, you need to setup the fields you want to pull from your integration. You need to choose them in the [Marketo integration settings page](https://hockeystack.com/dashboard/integrations/marketo/configure), in the **Lead Properties to Configure** section. After this configuration is saved, the Leads will be pulled when the next integration batch runs.

## Technical Details <a href="#block-001f48ce33c245da9f58cb52f13158f3" id="block-001f48ce33c245da9f58cb52f13158f3"></a>

To satisfy Marketo’s API requirements, we pull activities in batches of 300 and process the result in series. We also need to make separate requests to get the custom properties of the Lead objects.

Depending on your data volume, we pull the historical data on a monthly or daily basis and then move to daily basis for any new data after the initial setup. Marketo has a daily limit of 50k API requests and although we stay below this limit for daily data pulls, the historical data pull can get closer to the 50k limit. In that case, we stop processing and continue the next day when the limit is refreshed.

We look at the `activityDate` property and generate a `nextPageToken` to pull only the recently performed actions for each activity type. We store the last pulled date in our database, which allows us to never process the same data twice.
