APIs & Integrations

PFeldmann
Participant

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hi

 

I must upsert 200k of contacts, but I have also a lot of empty fields. 

I'm using the following  API endpoint: https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert

 

Here are two of my payload examples:

 

{
    "inputs": [{
            "properties": {
                "email": "test@gmail.com",
                "firstname": "",
                "phone": "1"
            },
            "id": "test@gmail.com",
            "idProperty": "email"
        }, {
            "properties": {
                "email": "hans.muster@gmail.com",
                "firstname": "",
                "phone": "1"
            },
            "id": "hans.muster@gmail.com",
            "idProperty": "email"
        }
    ]
}

 

 

The API also fails when I send a null

 

{
    "inputs": [{
            "properties": {
                "email": "test@screeningeagle.com",
                "firstname": null,
                "phone": "1"
            },
            "id": "test@screeningeagle.com",
            "idProperty": "email"
        }, {
            "properties": {
                "email": "hans.muste@screeningeagle.com",
                "firstname": null,
                "phone": "1"
            },
            "id": "hans.muste@screeningeagle.com",
            "idProperty": "email"
        }
    ]
}

 

 

My post seems to be a duplicate of this post: https://community.hubspot.com/t5/CRM/Not-Blank-the-value-while-using-batch-API-in-Upsert/td-p/106123...

 

I hope this post get's some attention to the developers. Because it's a problem for enterprise customers.

 

0 Upvotes
1 Accepted solution
BérangèreL
Solution
Community Manager
Community Manager

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hi @PFeldmann, thanks for your patience as the Team was looking into this!

I am glad to share that this is now fixed!

If you set up a property to "", then it resets it for upserts as usual as for updates.

Just to let you know, please be aware of this:

- Setting a property to null does nothing
- Setting a property to "" is the only way to "reset" it

I hope this helps!

Have a lovely day and please let me know if there is anything else I can help with. I'll be delighted to do so!

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


View solution in original post

0 Upvotes
4 Replies 4
BérangèreL
Solution
Community Manager
Community Manager

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hi @PFeldmann, thanks for your patience as the Team was looking into this!

I am glad to share that this is now fixed!

If you set up a property to "", then it resets it for upserts as usual as for updates.

Just to let you know, please be aware of this:

- Setting a property to null does nothing
- Setting a property to "" is the only way to "reset" it

I hope this helps!

Have a lovely day and please let me know if there is anything else I can help with. I'll be delighted to do so!

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


0 Upvotes
BérangèreL
Community Manager
Community Manager

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hi @PFeldmann,

I just heard from the Team and they are actually working on a fix for this, as we speak.

Thanks for your patience and your valuable feedback!

I'll keep you updated on this.

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


0 Upvotes
BérangèreL
Community Manager
Community Manager

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hey @PFeldmann,

Actually, we have a new tool just for that, could you please share your feedback here: "Developer Feedback Tool".

Thanks a lot!

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


BérangèreL
Community Manager
Community Manager

Contact Upsert Post action with either null or "" doesn't clear value

SOLVE

Hi @PFeldmann, I hope that you are well!

Thank you for reaching out to the Community and thanks for your valuable feedback!
I have shared it internally for more visibility!

I'd like to ask our Top Experts: Hi @zach_threadint, @louischausse and @jonchim do you have the same behavior, please? If yes, did you find a fix to help @PFeldmann, please?

Thanks so much and have a great weekend!

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


0 Upvotes