Every marketer dreams of the perfect form fill with all the key data points populated and ready to hand over to sales – but with the conversion rate buffs keeping our Marketo forms as short as they can,  we rely heavily on enrichment tools, data teams or even the dreaded clean up project.

Mix that in with the pain of data standardization, validation rules in CRM and bang – you’ll be hitting your head against the sync brick wall in no time.

The good news is – a lot of the information you will need to ensure a quality lead, or even a personalized journey could be solved with a simple OpenAI prompt fired directly from Marketo Engage. All you’ll need is a paid account of OpenAI and this handy guide!

Getting a OpenAI AI Key

First make sure you’ve signed up to an OpenAI ChatGPT Plus account (that’s the one which is just $20/month). Then follow this click by click guide:

Creating a Webhook

Now that you’ve got your API key from OpenAI, you’re ready to build your webhook. But before you do that, let’s just talk about the prompt we will be using.

{ 
  "model": "gpt-4o", 
  "messages": [
    {
      "role": "user", 
      "content": "Based on the email address {{lead.Email Address:default=edit me}}, provide the Company Employee Band (Choosing from this list: 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001-100000000). Do not provide any additional context. Only provide from the selection list."
    }
  ] 
}

Model refers to the chatgpt model, they differ in price so it’s important to check which one works best for your use case, at the date of publishing most people are using gpt-4o.

”content": "Based on the email address {{lead.Email Address:default=edit me}}, provide the Company Employee Band (Choosing from this list: 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001-100000000). Do not provide any additional context. Only provide from the selection list."

The next section after “content”: is the prompt that we’re asking OpenAI’s ChatGPT to figure out, in this example we’re taking a lead with an empty employee band field, asking OpenAI to look up the correct employee band (using various web sources) and then matching it back to the options from our CRM. You can modify this to suit you, or even change the field that you’re trying to update.

Step by step guide to creating a webhook in Marketo Engage

Now you’ve got your head around what we’re asking OpenAI to do, it’s time to build your webhook, follow this step by step guide on how to do that. Note: each webhook in Marketo Engage can only update one field.

Firing a Webhook in Marketo Engage

This is the part where you should feel most at home as we dive into Marketo Engage programs and assets. Now you’ve got your webhook set up you will need to test it:

  1. Set up a new Program
    1. Type: Default
    2. Select Channel : Operational (this excludes it from reporting)
  2. New local asset
    1. Select: List
    2. Name it something like “Trigger List”
  3. New local asset
    1. Select: Smart Campaign
    2. Name: “Get Employee Band from OpenAI”
  4. New local asset
    1. Smart List: Added to List
      1. List Name: is: {{enter your list name}}
    2. Flow: Call Webhook
      1. Webhook: OpenAI – Employee Band
    3. Schedule:
      1. Edit Settings:
        1. Edit Qualification Rules
        2. Select every time
        3. Save
      2. Select Activate

Now simply add someone to your list and within 2-3 minutes your webhook will fire. Use the Activity Log on the lead record to see if the field has been updated.

The possibilities are endless

With this model you can see how easy it is to clean up or standardise your data across your instance with a simple $20/month account on OpenAI. But do proceed with caution and remember to use the code above and the guide at your own risk.

If you’d like to learn more about how JTF can enable more AI use cases within your Marketo Engage instance, get in touch.