Recently, a client of mine asked to change all email address domains for a specific company due to a renaming: @moon-global.com should become @sun-global.com
How would you tackle that in the Marketo UI? That is a problem because in many ways the email address serves as the unique identifier for a person record. Specifically for list uploads or form submissions. So what can you do?
Well, you can change a person record manually. Just type in a new email address. No new record is created and the activity history, program memberships and so on stay intact. Also, if that person is synced to CRM, the email address will just be exchanged in CRM as well. CRM IDs remain the same.
Okay, that’s fine. What else?
We can upload a list while having the old email address in the standard field email and the new address in a new custom field like email temp, and then run a Change Data Value Flow Step to copy email temp to email.

But I suppose if you read this, you already know that. And we’re here to learn something new, right?
Let’s see how you can do that using the Marketo API and Postman. (And here I’d like to encourage you to read my first article on the topic: Marketo API for non-API people.)
Let’s take a look at the createOrUpdate operation in Postman:
{
"action":"createOrUpdate",
"lookupField":"email",
"input": [
{
"email": "michael@martech-magic.com",
"firstname": "Michael",
"lastName": "Florin"
}
]
}
This would create or update a person in Marketo while deduping on email address. We would achieve the exact same outcome by uploading a list or submitting a form.
But via API we can also dedupe on Marketo’s real unique identifier: The Person ID:

You will also find that Person ID in the URL on the person detail page:

Now let’s use this payload:
{
"action":"createOrUpdate",
"lookupField":"id",
"input": [
{
"id": 2072,
"email": "cfaircliff@sun-global.com"
}
]
}
Now we switched the lookup field to id, also added the id to the payload. We removed First and Last Name, as we don’t want to touch these.
Here’s the response:
{
"requestId": "e0ac#19d482fc0fc",
"result": [
{
"id": 2072,
"status": "updated"
}
],
"success": true
}
ID was updated and the operation was a success. Yeah!
Let’s take a look at Marketo’s person detail page and activity history:


Okay, now it’s time to hit an ugly truth: I just learned that Postman doesn’t allow the uploading of files within its free plan. The idea would have been this:
Create a Smart List in Marketo to find all records you want to update:

Export from the People tab. I usually create a minimalistic view for this, as I only want to download the fields I need:

Export to CSV. Open the file, copy the content and paste it into a csv-to-json converter. And then just ran the call from Postman like this:
{
"action":"updateOnly",
"lookupField":"id",
"input": [
{
"id": 2067,
"email": "bstanbrab7@sun-global.com"
},
{
"id": 2072,
"email": "cfaircliff@sun-global.com"
},
{
"id": 2094,
"email": "arodderbo@sun-global.com"
}
]
}
Well, I have to admit that this is no longer a quick and cool process. It’s tedious, so I need to apologize. Anyway: I’ll publish this post, as you might find something in here that’s new to you. And that would be a success, wouldn’t it?