Nav

Marketo Connector

Select

The Anypoint Connector for Marketo is a closed-source connector which provides a connection between Mule and Marketo REST APIs, implementing all the supported v1.0 Marketo API endpoints, including powerful DataSense functionality.

Marketo connector is a wrapper connector developed with MuleSoft’s Anypoint Connector DevKit version 3.8.2.

Prerequisites

This document assumes that you are familiar with the Marketo API.

To use this connector you need a:

  • MarketoDB instance with REST support.

  • Set of valid credentials, including the required Marketo endpoints, pointing to your instance. For more information check Marketo Developer Documentation.

  • MuleSoft Enterprise License.

To Install this Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. Follow the prompts to install the connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update. After updating, update Maven dependencies to the new version.

To Configure the Marketo Connector Global Element

To set up the Global Configuration:

  1. Go to the Global Element tab and click Create.

  2. Inside the filter textbox enter Marketo, and select Marketo: Configuration, from the Connector Configuration directory.

  3. When you select the global element of your choice, you are presented with the global element properties to enter.

    1. The Client ID field refers to your LaunchPoint ID.

    2. The Client Secret field should contain the corresponding secret of your LaunchPoint.

    3. The Rest Endpoint URL field should contain the URL to your REST WebService.

The following screenshot shows the Marketo configuration with Spring property placeholders (for more information see Configuring Properties) for the Connection field values. This is the recommended approach when you plan to deploy your application to CloudHub or to a Mule runtime server. However, you may hardcode your connection credentials into the Global Element Properties shown below if you are in the development stage and simply want to speed up the process.

marketo global configuration

Before testing or running a project that uses the Marketo connector, start adding the following to your project:

  • Your Marketo credentials and endpoints in a .properties file and load them using the Property Placeholder component.

  • An inbound endpoint into your flow. For example, HTTP.

  • A Transform Message component.

  • A transformer For example, Object to JSON.

Using the Connector

See a full list of operations for any version of the connector Marketo Technical Reference.

Namespace and Schema

When designing your application in Studio, dragging the connector from the palette onto the Anypoint Studio canvas automatically populates the XML code with the connector namespace and schema location.

If you are manually coding the Mule application in Studio’s XML editor or other text editor, paste these into the header of your Configuration XML inside the tags.

Namespace: http://www.mulesoft.org/schema/mule/marketo

Schema Location: http://www.mulesoft.org/schema/mule/marketo/current/mule-marketo.xsd

Marketo API Limitations

  • Only static lists are accessible. Smart lists are not accessible via the API.

  • Marketo has a daily request limit. You can check this limit in your Sandbox > Admin > Web Services.

CRM Integration Limitations

Instances that have a native CRM integration enabled will have Company, Opportunity, and Sales Persons APIs disabled by Marketo. So while the operations are available for selection, Marketo’s API would respond with an error specifying they cannot be used. If you’re not sure about their availability in your environment, use the Test Connectivity button in your global configuration for Marketo connector.

To Invoke an Operation

To invoke a simple operation (such as the Leads > Create Or Update operation), follow these steps:

  1. From the palette, drag and drop the Marketo connector into your flow by placing it between the Transform Message and the Object to JSON Transformer.

  2. Configure the connector by selecting the Connector Configuration you created in the previous section and choosing the operation to invoke.

  3. Now, click on Transform Message. By the agility of Datasense, you are presented with a list of possible lead fields to use, as available to your Marketo instance.

Marketo Connector


          
       
1
2
3
4
5
6
7
8
9
%dw 1.0
%output application/java
---
[{
        company: "ACME",
        billingCity: "Texas",
        website: "123boom.com",
        industry: "Explosives"
}]

The complete example flow is included here for your reference.

complete example flow


          
       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata"
xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:marketo="http://www.mulesoft.org/schema/mule/marketo"
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/marketo
http://www.mulesoft.org/schema/mule/marketo/current/mule-marketo.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking
http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ee/dw
http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/json
http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
    <marketo:config name="Marketo__Configuration" clientId="${clientId}"
    clientSecret="${clientSecret}" restEndpointUrl="${restEndpointUrl}"
    doc:name="Marketo: Configuration"/>
    <http:listener-config name="HTTP_Listener_Configuration"
    host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>

<flow name="Create-Lead-Flow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <dw:transform-message doc:name="Transform Message">
            <dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
[{
        company: "ACME",
        billingCity: "Texas",
        website: "123boom.com",
        industry: "Explosives"
}]]]></dw:set-payload>
        </dw:transform-message>
        <marketo:create-or-update-lead config-ref="Marketo__Configuration" doc:name="Create Lead"/>
        <json:object-to-json-transformer doc:name="Object to JSON"/>
    </flow>
    </mule>

Using the Connector in a Mavenized Mule App

If you are coding a Mavenized Mule application, include this XML snippet in your pom.xml file.


         
      
1
2
3
4
5
<dependency>
  <groupId>org.mule.modules</groupId>
  <artifactId>mule-module-marketo</artifactId>
  <version>2.0.2</version>
</dependency>

Inside the <version> tags, put the desired version number, the word RELEASE for the latest release, or SNAPSHOT for the latest available version. The available versions to date are:

  • 2.0.2

  • 2.0.0

  • 1.2.5

See Also