Resources/Get more here/Exporting Data

Integration: Marketo Munchkin API

Faith Hoefner
posted this on Feb 15 17:00

If you're using Marketo's SaaS platform for post-conversion marketing automation, and would like LiveBall forms to pass data into your Marketo database, read on.

LiveBall is an open system that makes it easy to pass data in and out. We have many customers who seamlessly and automatically use LiveBall with Marketo (and other post-conversion marketing automation systems). You may choose to outsource your Marketo integration to ion, or do it yourself (instructions below). In either case, once integration is complete, data collected in LiveBall will be transferred into Marketo in real time each time a form is submitted.

Please note that in cases where the Marketo service is unavailable at the time of data collection in LiveBall, your data will be safely stored in LiveBall, but will not pass into Marketo. In those cases, neither Marketo nor LiveBall will be aware that data was not accepted by Marketo.


Before We Begin, You Will Need

  1. Notify your account manager that you would like to integrate with Marketo (see #2 below).
  2. Decide if you would like to outsource the integration or do-it-yourself using the directions below.
  3. Your account manager will need your Marketo account ID and Marketo munchkin API private key. You will find this in your Marketo console by clicking on 'admin' (top right) and then by clicking on 'munchkin setup' in the left rail. You must have 'enable munchkin API' checked.
Please note that Marketo integration support is not included in your LiveBall subscription.


Let's Get Started

Marketo requires two pieces of code in order to accept data from LiveBall. The data pass is done in real time via javascript on the page following the submission of data. The first piece of code is the ion LiveBall Marketo Script. Your account manager will provide you with a the ion LiveBall Marketo script after receiving your Marketo to Munckin account id and private key. This script is standardized across all instances of data passing. The second script is the one that actually passes the data. It maps LiveBall data to Marketo data fields and sends it to your Marketo account. Both scripts must be present on any page that passes data to Marketo. Here are the steps you need to follow to pass data from LiveBall into Marketo:

  1. In Marketo, again click on 'admin' and then 'field management'. Then near the top of the page, click on 'export field names' and save the resulting spreadsheet for your reference. You need this spreadsheet to get the exact field names into which you will pass data from LiveBall.
  2. The first (A) column in the Marketo spreadsheet includes your field 'API names' (in Marketo). You will reference the field API name in order to pass data from LiveBall to Marketo.
  3. In LiveBall, in the 'integration' menu, click on 'data collection'. Then click on the data field category that contains the fields that you want to pass into Marketo. You should now be looking at a list of fields. You will reference any fields in LiveBall by their 'data name' preceded by @@ when you put your data passing script together in the next step.
  4. Now it's time to put your Marketo Data Pass script together. Here's an example of what you'll end up with:
    <!-- Marketo Data Pass -->
    <script type="text/javascript">

    var email;
    email = SHA1('XXXXXXXXX' + '@@EmailAddress'); <!-- Your Marketo Private API Key -->

    mktoMunchkin("XXX-XXX-XXX"); <!-- Your Marketo Account ID -->

    mktoMunchkinFunction('associateLead',
            {
            Email: '@@EmailAddress', <!-- Map Marketo fields to LiveBall fields -->
            FirstName: '@@FirstName', <!-- FirstName is the Marketo field API name -->
            LastName: '@@LastName', <!-- @@LastName is the LiveBall field name -->
            Company: '@@Organization', <!-- Map ALL of your used LiveBall data fields -->
            Subscribe__c: '@@Subscribe',
            Phone: '@@Phone',
            Contact_Me__c: '@@Contact_Me',
            KW__c: '@@KW'  <!-- We pass keywords in and pass them out to Marketo -->
            },
           '' + email + ''
        );
    </script>
    <!-- END Marketo Data Pass -->
     
  5. Your data passing script must be formatted exactly like the one above. You need to slug in your Marketo API key, your Marketo account ID and all of your field mappings. There is no harm in having fields in this script that do not include data (blank or unused). Therefore, we highly recommend that you make your Marketo script as complete as possible by including all of the LiveBall data fields included in all of your LiveBall forms. This practice will allow you to switch LiveBall forms with the confidence of knowing that whatever form you put in will pass all of its data to Marketo.
  6. In LiveBall, navigate to your global Scripts library by selecting "Scripts" inder the global "Libraries" menu. Add a category for Marketo and save the header and data pass script separately.
  7. Next, navigate to the page that you want to use to pass data into Marketo. This will likely be the page that follows a form submission (not the form page itself, but rather the page that's returned after a successful submission).
  8. Click on the 'script' button in the page editor bar at the top of the LiveBall page. You should now see the 'script editor'.
  9. In the <head> editor, select your Marketo head tag from the drop-down menus then save. Select the data pass script from the drop-down menus before the closing </body> tag then save.
  10. In order to test your Marketo integration, you must use a live traffic source in LiveBall. LiveBall preview mode does not pass data via javascript. When your script is working properly, you will see the new or updated record in Marketo virtually instantaneously. Once you are certain that your integration is functioning properly and that all of your data is being passed to Marketo, you're ready to complete your integration.
  11. Repeat steps 7-10 for all instances within LiveBall where you want to pass data to Marketo.