Monday, October 24, 2016

Introducing WSO2 ESB Connector for Pardot

Pardot is one of the leading marketing automation tools. It provides a full suite of tools that help marketers create meaningful connections, generate more pipeline, and empower sales to close more deals.

Now WSO2 ESB supports connecting Pardot via its Pardot connector. Pardot connector allows you to access the Pardot through its REST API. Let’s see how to configure the Pardot connector.


Requirements 
  • WSO2 ESB
  • Pardot connector
  • Pardot account

Get the credentials from Pardot account
  • Obtain the email, password, and user_key from your Pardot account.
  • For user_key, click {your email address} > Settings > API User Key.

Setup the WSO2 ESB with Pardot Connector
  • Download the ESB from here and start the server.
  • Download the Pardot connector from WSO2 Store.
  • Add and enable the connector via ESB Management Console.
  • Create Proxy service to retrieve prospects details from Pardot and invoke the proxy with the following request.

Proxy Service

 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
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="getProspects"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
   <target>
      <inSequence>
         <property expression="//apiUrl" name="apiUrl"/>
         <property expression="//email" name="email"/>
         <property expression="//password" name="password"/>
         <property expression="//userKey" name="userKey"/>
         <property expression="//apiVersion" name="apiVersion"/>
         <property expression="//createdAfter" name="createdAfter"/>
         <property expression="//limit" name="limit"/>
         <property expression="//sortBy" name="sortBy"/>
         <property expression="//sortOrder" name="sortOrder"/>
         <pardot.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <email>{$ctx:email}</email>
            <password>{$ctx:password}</password>
            <userKey>{$ctx:userKey}</userKey>
            <apiVersion>{$ctx:apiVersion}</apiVersion>
         </pardot.init>
         <pardot.getProspects>
            <createdAfter>{$ctx:createdAfter}</createdAfter>
            <limit>{$ctx:limit}</limit>
            <sortBy>{$ctx:sortBy}</sortBy>
            <sortOrder>{$ctx:sortOrder}</sortOrder>
         </pardot.getProspects>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<request>
   <apiUrl>https://pi.pardot.com/api</apiUrl>
   <email>johndoe@gmail.com</email>
   <password>johnpass</password>
   <userKey>1oic7694habc85lkgng965ut85</userKey>
   <apiVersion>3</apiVersion>
   <createdAfter>yesterday</createdAfter>
   <sortBy>created_at</sortBy>
   <sortOrder>descending</sortOrder>
   <limit>2</limit>
</request>


References
  1. http://www.pardot.com/
  2. https://docs.wso2.com/display/ESBCONNECTORS/Pardot+Connector

No comments:

Post a Comment