SOLVED

Re: Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

Go to solution
cagarwal
Level 3

Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

Still figuring how the Partitions work on Marketo. We are looking for a way to create new users through REST API on a specific partition called "APAC" on our Marketo. Net new leads are being added just fine; however; those leads who are already in a default Partition with same email address are not being added into the "APAC" partition. 

 

Below is our JSON body:

 

{
"input": [
{"email":"test@test.com"}
],
"action":"createOrUpdate",
"partitionName":"APAC"
}

 

 

Here is the output we are seeing, but no change on Marketo.

 

 

{
    "requestId": "16835#17a61d9d767",
    "result": [
        {
            "id": 5571,
            "status": "updated"
        }
    ],
    "success": true
}

 

CA
Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

I don’t think you need a custom dedupe key, but you do need additional pre-check logic.

 

If you query first and see there’s already someone with a given email address, you can then insert a new lead by ID with the ID set to -1. Then change their email address.

 

Marketo doesn’t actually care if multiple records have the same email address (I wouldn’t exactly agree with the way Katja phrased it). Some, but not all, ways of creating leads will automatically dedupe on email address unless you set up a compound dedupe key with support. It‘s best to avoid this and only live within the default constraints.

View solution in original post

3 REPLIES 3
Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

Unless you have implemented custom deduplication keys, Marketo will only ever accept the same email address once. From the below, I would expect your existing record to have been updated. So if you want the same email address to appear as two separate records in your two partition, you would need to instruct Marketo to set up partition id as a second dedup key in your instance.

Beware though, because allowing duplicates also has plenty of downsides.

SanfordWhiteman
Level 10 - Community Moderator

Re: Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

I don’t think you need a custom dedupe key, but you do need additional pre-check logic.

 

If you query first and see there’s already someone with a given email address, you can then insert a new lead by ID with the ID set to -1. Then change their email address.

 

Marketo doesn’t actually care if multiple records have the same email address (I wouldn’t exactly agree with the way Katja phrased it). Some, but not all, ways of creating leads will automatically dedupe on email address unless you set up a compound dedupe key with support. It‘s best to avoid this and only live within the default constraints.

cagarwal
Level 3

Re: Unable to create new lead profile in a different partition through REST API for already existing lead in default partition

That's not a bad idea! Here's what we went with and got it working for us.

 

  1. Added a custom checkbox field.
  2. If the lead was found, we flagged this field = true
  3. Set up smart campaign under default workspace to detect this flag and move partition.
  4. Then add to list within the intended workspace.

This naturally did not create a duplicate; but also did the trick. Luckily, it was okay to move partitions rather than create a dupe.

CA