5 Replies Latest reply on Jan 18, 2017 12:31 PM by Sanford Whiteman

    Customer.io Integration

    Jenn DiMaria

      Has anyone connected customer.io and Marketo before? We're looking to pass customer.io unsubscribes to our Marketo database and are thinking a webhook would be the best way to go about this, but I'd like to hear what others did if there's a better/cleaner way.

       

      Thanks in advance!

        • Re: Customer.io Integration
          Josh Hill

          i would think API is much easier in the long run.

            • Re: Customer.io Integration
              Jenn DiMaria

              Thanks, Josh! I've been playing around with using the REST API endpoint url, so I'm hoping to test it this afternoon. I think you're right.

                • Re: Customer.io Integration
                  Sanford Whiteman

                  Pushing individual "messages" (in Customer.io parlance) via the Marketo REST API is going to drain your API calls dry.

                   

                  It would be better to use a Forms API form post for this action.

                    • Re: Customer.io Integration
                      Jenn DiMaria

                      Thanks, Sanford!

                       

                      So the only option I have in customer.io to enter any endpoint URL is the below:

                       

                      Is this where I'd tell it to post to the form API? And is this the URL I'd use?

                       

                      /rest/asset/v1/form/{id}/field/{fieldId}.json

                        • Re: Customer.io Integration
                          Sanford Whiteman

                          Is this where I'd tell it to post to the form API? And is this the URL I'd use?

                           

                          /rest/asset/v1/form/{id}/field/{fieldId}.json

                          Nope... that's the Marketo REST API endpoint for managing fields on forms (not populating them).

                           

                          The Forms API endpoint is /index.php/leadCapture/save* on your pod.

                           

                          The problem here is going to be that their webhook (like many "think they're cool" modern-era webhooks) posts only JSON-encoded data, as opposed to form-encoded data. For a very brief, example that means they send a payload like:

                           

                          {

                            "data" : {

                              "event_name" : "unsubscribed",

                              "email_address" : "customer@example.com"

                            }

                          }

                           

                          but we need

                           

                            munchkinId=123-AAA-456&formid=7890&Email=customer%40example.com

                           

                          on the form side.

                           

                          This means you need to translate the data from (incoming) JSON to (outbound) form encoding by going through an intermediate server. This doesn't have to cost you anything to run -- you can use Amazon API Gatway, and most likely for your load it would cost only pennies per month -- but someone needs to set up the mapping.

                           

                          Note there's no direct route to Marketo here. You can't post the the JSON data directly to Marketo, either. It would still need to be translated, in this case from one JSON structure to another JSON structure (not to mention authenticated).  It would be far easier to build the JSON-to-form than the JSON-to-OAuth-to-JSON (and like I mentioned the latter has major API limits).