Marketo Reference
Build on Marketo without limits. Sync all your Marketo data to your Postgres database in real-time. Query your Leads, Campaigns, and Activities with SQL or your ORM. Get all API events in a hosted Kafka cluster. And insert
, update
, or delete
Marketo records in both Marketo and your database simultaneously.
Supported objects
Collection Name | Read | Write |
---|---|---|
Activities | ✅ | |
Authentication | ||
Campaigns | ✅ | ✅ |
Channels | ✅ | ✅ |
Companies | ✅ | ✅ |
Custom Objects | ✅ | ✅ |
Email Templates | ✅ | ✅ |
Emails | ✅ | ✅ |
Files | ✅ | ✅ |
Folders | ✅ | ✅ |
Form Fields | ✅ | ✅ |
Forms | ✅ | ✅ |
Landing Page Content | ✅ | ✅ |
Landing Page Templates | ✅ | ✅ |
Landing Pages | ✅ | ✅ |
Leads | ✅ | ✅ |
Named Account Lists | ✅ | ✅ |
Named Accounts | ✅ | ✅ |
Opportunities | ✅ | ✅ |
Program Members | ✅ | ✅ |
Programs | ✅ | ✅ |
Sales Persons | ✅ | ✅ |
Segments | ✅ | ✅ |
Smart Campaigns | ✅ | ✅ |
Smart Lists | ✅ | ✅ |
Snippets | ✅ | ✅ |
Static Lists | ✅ | ✅ |
Tags | ✅ | ✅ |
Tokens | ✅ | ✅ |
User Management | ✅ |
Setup & installation
Giving Sequin access to Marketo’s API requires you to create a Custom Service and API Only User for that service in Marketo. Even if you already have a Marketo API User, it’s best to create one that’s solely for the Sequin service you’ll create. Having a dedicated user for the Sequin integration lets you more easily track changes from Sequin syncs.
Create Marketo service
Before you can create a Custom Service, you need to create a Marketo role with API Access and a user with that role. None of the default Marketo Roles have API access, so if this is your first API integration in Marketo, you first need to create an API access role.
Create Marketo API access role
- In Marketo, go to Admin > Users & Roles > Roles and click New Role.
- Enter a Role Name, for example, “Sequin Integration Role”, Description, and give it the permissions your sync type requires:
- Read-Write Assets
- Read-Write Campaign
- Read-Write Company
- Read-Write Custom Objects
- Read-Write Object Type
- Read-Write Account
- Read-Write Account List
- Read-Write Opportunity
- Read-Write Person
- Click Create.
Create Marketo API user
After creating a role, you need to create an API-Only user. API-Only users are a special type of user in Marketo, as they are administrated by other users and cannot be used to log in to Marketo.
- In Marketo, go to Admin > Users & Roles > Users and click Invite New User.
- Enter an email address, first name, and last name for the user. (These don’t need to be valid.) Click Next.
- Assign the role you created in the prior section, click the API Only checkbox, and click Next.
- The last screen for user creation says “An invitation is not required for API only.” Click Send to create the API-Only user.
Create Marketo custom service
Custom Services provide the actual credentials required to authenticate Marketo to Sequin. To provision one, follow these instructions:
- In Marketo, go to Admin > LaunchPoint and select New Service.
- Give your service a descriptive name. From the Service list, select the Custom. Give your service a description, for example, “Sequin Integration” and select the API Only user you previously created, then click Create.
- This adds a new service to your list of LaunchPoint services, and the option to View Details. Click on View Details and save the Client Id and Client Secret for use in Sequin.
You’re now ready to provide Sequin access to Marketo.
Connect Sequin to Marketo
In Sequin, click Add sync and select Marketo. Then, enter the following information:
- Client ID
- Client Secret
- Base URL
You can find the Base URL in Admin > Integration > Web Services under REST API.
The syncing process
We first backfill your database with all your Marketo data. The time for the backfill depends on the size of your Marketo account. Unless your Marketo account has over a million records, the backfill should complete in under an hour. Smaller accounts complete in just a few minutes. We’ll email you when your backfill is complete and Sequin has loaded all your data into your database.
After the initial backfill, we’ll rely on Marketo Data Streams to monitor changes. We backstop Data Streams with an occasional polling process to ensure we don’t miss any events. This means changes on Marketo should propagate to your database in just a few seconds.
Learn more about our syncing process.
Read and write Marketo data using SQL
You’ll connect to your database via Sequin’s Postgres Proxy, which lets you read from your synced tables as well as write to them. You can use any SQL client that works with Postgres.
Here’s an example of what your Marketo tables might look like in your database:
You’ll see all the Marketo objects you selected when setting up your sync are now tables in your database. You’ll also see a _sync_cdc
table which Sequin uses to manage your sync.
Here’s what it looks like to query the campaign
table:
Which returns a row that looks like:
Writing back to Marketo is as simple as writing a SQL query. For example, you can mark a user’s email as verified like this:
Sequin will write this change to both Marketo and your database at the same time.
If a write to Marketo fails, Sequin will roll back the write to your database. For example, if you try to update a user’s email to an invalid email address, you’ll receive a Postgres error:
Next steps
Your Marketo tables are now available as fully readable and writeable tables in your database. You can query for all your data using SQL, and mutate data thanks to Sequin’s Postgres Proxy. To build on this foundation, here are some next steps:
- Setup your ORM to work with your synced tables.
- Edit the Marketo objects and properties you’re syncing at any time.
- Create views on your Marketo data to tailor your schema to your needs.
- Invite your team to your Sequin account and start building!
If you need assistance setting up your sync, just send us a note. We’re around and eager to help.