In Bulk Users Import Job, how to prevent overwriting unspecified meta data?

Hello,
I am using Bulk Users Import Job, attempting to update our user’s meta data.
For example, our user profile user meta data might look something like this:

{
  "language": "en-ca",
  "customer_id": 0000001,
  "favorite_color": blue
}

And I would have this as the json array to update only the customer_id meta data

[
  {"email": "test1@yopmail.com",      "user_id": "auth0|
636177aba862169c6f2f5b37",      "user_metadata": {"customer_id": 8888881}   },
  {"email": "test2@yopmail.com",      "user_id": "auth0|63617886dc4c78e593bb3c5c",      "user_metadata": {"customer_id": 8888882}   }
]

But after running the import, the user profile will now b e

{
  "customer_id": 8888881
}

As per documentation:

I have in the parameter upsert: true

Thank you.

Hi @fractal ,

When bulk import users, with upsert: true the existing user profile will be overwritten. That’s the behavior you observed.

To avoid this, please export the user profile first, make the changes to the export file, and import it again.

In this FAQ, note #7 mentioned this limitation.

Hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.