Updating Smart List Values Using cURL

If you’re searching your database for a list of IT people, your first step is likely to create a Smart List and add a filter that says: Job Title: contains IT

But when you see the final list, you will notice that everyone with a job title containing the letter sequence “IT” is shown, including those with irrelevant titles, like SecurITy Officer, ArchITect, etc. So, what’s the workaround here?

Attempt 1: Add an additional filter

For most of us, the next step would be to create a list of all irrelevant titles and then exclude them from the Smart List by adding an additional filter. The problem with this approach is that it involves a lot of manual list work and is not very scalable.

Attempt 2: Add a space from UI

You may have also tried adding a space to the keyword in the Smart List to exclude irrelevant titles. But if you try this, you realize that after you save the values, the extra space is gone.

Unfortunately, Marketo doesn’t allow users to add special characters from the UI, so when you click, “OK,” it automatically removes the extra space.

Solution: Adding a space in a Smart List value using cURL

The good news here is that Marketo allows users to add extra characters on the back-end through Marketo’s server. Here’s how it works:

1. In Google Chrome, open Dev Tools and go to the “Network” tab.

2. Enter the keyword to which you want to add the spaces in the Smart List, but do not add spaces yet. In this example, we are adding “IT” 3 times.

  • For the first value, we will add a space before “IT”
  • For the second one, we will add a space after “IT”
  • For the third one, we will add a space on both sides of “IT”

3. Click ‘OK’. You will see the “editSmartListSubmit” response option.

  • Right-click on it
  • Select Copy as cURL.

4. Next, paste the cURL message to any text document and search for the keyword to which you want to add the space. Tip for finding it quickly – the keyword will contain ‘%22’ on both sides.

5. Now add the Space character (‘%20’) to your keyword. A list of all the characters can be found here: https://www.w3schools.com/tags/ref_urlencode.ASP.

6. Copy the complete response message, and send the response back to Marketo using Terminal.

Voila! Now, go to Marketo Smart List and refresh the page. You will see the extra spaces added to your keyword.


You just went from this:

To this:

If you follow these steps, you can save yourself time and build the Smart List you’re looking for easily.