Over a year ago we posted Retrieving customer and prospect information from Marketo using the API. That post presented a code sample that could be run on a recurring basis to poll Marketo for updates. The idea was to use Marketo APIs to identify changes to lead data, and extract the lead data that had … Continue reading “Synchronizing Lead Data Changes using REST API”
Category: How-To
Best practices, examples, and more.
Sending Transactional Emails with the Marketo REST API: Part 2, Custom Content
Last time, we took a look at triggering transactional emails from outside of Marketo. This week we’ll be looking at how to pass dynamic content to our emails via the Request Campaign API call. Request Campaign not only allows the triggering of emails externally, but you can also replace the content of My Tokens within … Continue reading “Sending Transactional Emails with the Marketo REST API: Part 2, Custom Content”
Sending Transactional Emails with the Marketo REST API: Part 1
A common use case for the Marketo API is to trigger the sending of transactional emails to specific records via the Request Campaign API call. You can find an example covering this use case with the SOAP API here. There are a few configuration requirements within Marketo in order to execute the required call with … Continue reading “Sending Transactional Emails with the Marketo REST API: Part 1”
Authenticating and Retrieving Lead Data from Marketo with the REST API
Note: In the Java examples below, we’ll be using the minimal-json package to handle JSON representations in our code. You can read more about this project here: https://github.com/ralfstx/minimal-json One of the most common requirements when integrating with Marketo is the retrieval of lead data. Most, if not all integrations will require either the retrieval or submission … Continue reading “Authenticating and Retrieving Lead Data from Marketo with the REST API”
In-App Web Personalization (Beta) using the RTP API
Several of our customers provide web app solutions for their users and we receive requests if they can use Marketo Real-Time Personalization (RTP) within their secured web app environment. The answer is yes! We’ve released an API for In-App messaging, so you can personalize content and promote marketing activities like webinars, new feature releases, up-sells … Continue reading “In-App Web Personalization (Beta) using the RTP API”
Synchronizing Email Unsubscribes Across Instances
Do you manage multiple instances of Marketo? Keeping lead information synchronized across instances can be challenging. Here is a way to sync email unsubscribes across instances using a webhook that calls an external web service. The external web service loops through each instance looking for the known lead that triggered the unsubscribe event. When a … Continue reading “Synchronizing Email Unsubscribes Across Instances”
Add a Reset Button to a Marketo Form
1 2 3 4 5 |
<script src="//app-sj01.marketo.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_116"></form> <script>MktoForms2.loadForm("//app-sj01.marketo.com", "410-XOR-673", 116, function(form) { form.getFormElem()[0].querySelector('button[type="submit"]').insertAdjacentHTML('afterend','<button type="reset" class="mktoButton">Reset</button>') }); </script> |
Highlighting Open Source Projects Built on the Marketo Platform: Part Three
This is the third post in an ongoing series highlighting open-source projects built around the Marketo platform by the developer community. The first post in this series is available here, and the second post is available here. We maintain a list on Marketo’s GitHub account where we track client libraries and projects created by the … Continue reading “Highlighting Open Source Projects Built on the Marketo Platform: Part Three”
Store a Second Email Address for a Lead
Let’s say you want to change a lead’s score in Marketo using the APIs. This is possible to do with the REST API using the Create/Update Lead endpoint. If you want to store more than one email on a lead record, you would need to create a custom field, and store the second email there. … Continue reading “Store a Second Email Address for a Lead”
Change a Lead’s Score via the REST API
Let’s say you want to change a lead’s score in Marketo using the APIs. This is possible to do with the REST API using the Create/Update Lead endpoint. Below is a code sample in Ruby that shows how to make this call.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
require 'rest_client' require 'json' #Build request URL #Replace AAA-BBB-CCC with your Marketo instance marketo_instance = "https://AAA-BBB-CCC.mktorest.com" endpoint = "/rest/v1/leads.json" #Replace with your access token auth_token = "?access_token=" + "ac756f7a-d54d-41ac-8c3c-f2d2a39ee325:ab" request_url = marketo_instance + endpoint + auth_token #Build request body data = { "action" => "updateOnly", "input" => [ { "email" => "example@email.com", "leadScore" => "30" } ] } #Make request response = RestClient.post request_url, data.to_json, :content_type => :json, :accept => :json #Returns Marketo API response puts response |
In the JSON body of the request, we specify updateOnly as the … Continue reading “Change a Lead’s Score via the REST API”