Custom Objects in Marketo - Part 3 - SOAP API

John_M
Marketo Employee
Marketo Employee

Good old SOAP API. The SOAP API for custom objects has been around a while and its still a perfectly viable option for getting custom object data into Marketo. A note, I use SOAP UI as my tool of choice but of course you can use whatever you like. My screenshots will be generated there. (Note: You can read about using the REST API in Part 2 of the series)

The API calls you'll use are as follows

Most often you'll use the first two. Note that you'll supply the Link field and the dedupe fields to fully specify the object. Keep in mind, most often custom objects are intended to model data that exists in a one to many relationship with a Lead or Company. You can also send in multiple objects with each call, and this is the best practice. I have created integration which send up to 500 per call without issues.

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt="http://www.marketo.com/mktows/">

   <soapenv:Header>

      <mkt:AuthenticationHeader>

         <mktowsUserId>${#TestCase#userid}</mktowsUserId>

         <requestSignature>${#TestCase#signature}</requestSignature>

         <requestTimestamp>${#TestCase#timestamp}</requestTimestamp>

      </mkt:AuthenticationHeader>

   </soapenv:Header>

   <soapenv:Body>

      <mkt:paramsSyncCustomObjects>

         <objTypeName>automobile_c</objTypeName>

         <customObjList>

            <customObj>

               <customObjKeyList>

                  <attribute>

                     <attrName>emailaddress</attrName>

                     <attrValue>JMattos@Marketo.com</attrValue>

                  </attribute>

                  <attribute>

                     <attrName>vinnumber</attrName>

                     <attrValue>5NPDH4AE2DH181717</attrValue>

                  </attribute>

               </customObjKeyList>

               <customObjAttributeList>

                  <attribute>

                     <attrName>color</attrName>

                     <attrValue>Silver</attrValue>

                  </attribute>

                  <attribute>

                     <attrName>model</attrName>

                     <attrValue>Sonata</attrValue>

                  </attribute>

                  <attribute>

                     <attrName>make</attrName>

                     <attrValue>Hyundai</attrValue>

                  </attribute>

                  <attribute>

                     <attrName>yeah</attrName>

                     <attrValue>2015</attrValue>

                  </attribute>

               </customObjAttributeList>

            </customObj>

         </customObjList>

         <operation>UPSERT</operation>

      </mkt:paramsSyncCustomObjects>

   </soapenv:Body>

</soapenv:Envelope>

Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/">

   <SOAP-ENV:Body>

      <ns1:successSyncCustomObjects>

         <result>

            <syncCustomObjStatusList>

               <syncCustomObjStatus>

                  <objTypeName>automobile_c</objTypeName>

                  <customObjKeyList>

                     <attribute>

                        <attrName>emailaddress</attrName>

                        <attrType xsi:nil="true"/>

                        <attrValue>LJankins@Blizzard.com</attrValue>

                     </attribute>

                     <attribute>

                        <attrName>vinnumber</attrName>

                        <attrType xsi:nil="true"/>

                        <attrValue>5NPDH4AE2DH181717</attrValue>

                     </attribute>

                  </customObjKeyList>

                  <status>UPDATED</status>

               </syncCustomObjStatus>

            </syncCustomObjStatusList>

         </result>

      </ns1:successSyncCustomObjects>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

2042
0