Getting 1007 error code

Highlighted
Anonymous
Not applicable

Getting 1007 error code

Hi,

I am trying to create leads of 300 in marketo using Rest APIs with "createOnly" option. "Email" is the lookup criteria.

There are some leads having Null Email values.

For some leads we are getting error code as 1007 as response. But according to the documentation this error code should be returned when we try to update a record and if there are multiple matches with the given look up criteria.

So why am I getting this error code in case of "createOnly" request.

12 REPLIES 12
Highlighted
Level 10 - Community Moderator

Re: Getting 1007 error code

Are you getting this error on the NULLs?  You seem to be mentioning a major clue but not tying the two together.

Highlighted
Anonymous
Not applicable

Re: Getting 1007 error code

Tested further and found that, We are getting this error code when we put EMPTY value for email field. One such lead from that batch is getting created and rest all are getting 1007 error code.

When we do not pass email field at all then leads are getting created.

Highlighted
Level 10 - Community Moderator

Re: Getting 1007 error code

Makes sense.  An empty value is not a NULL.  Depending on database design, multiple NULLs can be allowed but not multiple empty strings.

Highlighted
Anonymous
Not applicable

Re: Getting 1007 error code

Agree but the API is behaving different in different use cases.

Tried the following use case and in this case all leads are getting created though there are multiple leads with EMPTY email field value.

Lead1 with NULL Value

Lead2 with EMPTY Value

Lead3 with EMPTY Value

Lead4 with EMPTY Value

Lead5 with EMPTY Value

But if when we add another lead to the above list with a valid email field value then we are hitting that error code. Input looks like below.

Lead1 with NULL Value

Lead2 with "valid@email.com" Value

Lead3 with EMPTY Value

Lead4 with EMPTY Value

Lead5 with EMPTY Value

in this case first 3 leads are getting created but the last 2 are skipped with error code 1007.

Why behavior is different in both these cases if EMPTY is considered as a valid email value.

Anonymous
Not applicable

Re: Getting 1007 error code

Also Please see that, the same lead with EMPTY email value is getting created in another API call though lead exists with an empty email value in database

Highlighted
Anonymous
Not applicable

Re: Getting 1007 error code

The following use case is also returning 1007 error code for last 3 records.

Lead1 with NULL Value

Lead2 with "valid@email.com" Value

Lead3 with NULL Value

Lead4 with NULL Value

Lead5 with NULL Value

Highlighted
Level 10 - Community Moderator

Re: Getting 1007 error code

I agree, this is unexpected behavior. I hadn't had a chance to run into it before because I skip leads without addresses.  I would file a bug.  While you're waiting for a fix, you could set the email to <GUID>@example.com to ensure they always get imported, then clear the matching leads in a batch campaign.

Highlighted
Anonymous
Not applicable

Re: Getting 1007 error code

Sure thanks for the quick reply. When can we expect the fix?

Highlighted
Level 10 - Community Moderator

Re: Getting 1007 error code

Let's see what Kenny Elkington​ says.