Recent searches


No recent searches

Custom fields for authenticated users with the Chat SDK

Answered


Posted Sep 13, 2021

I have read the documentation for  “Enabling authenticated users with the Chat SDK”. In the documentation, the following fields are mentioned: name, email, iat, external_id and exp.

But I have configured some custom user fields at Zendesk admin dashboard > Manage > User Fields. And I would like to automatically fill these fields too.

To do that, I have tried to add a field user_fields to the JWT. It is a dictionary of custom user field key and values to set on the user. Each custom user field is identified by its field key found in the user fields admin settings.

For example:

{
    "email": "jane.doe@gmail.com",
    "name": "Jane Doe",
    "user_fields": {
        "telefone": "11999999999",
        "cpf": "12345678909"
    },
    "iat": 1631549926,
    "external_id": "my-user-id"
}

By doing this, only the name and email where filled at Zendesk Chat dashboard. The custom fields remained empty. Is there any way to fill these fields automatically?


0

3

3 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Danilo,

Unfortunately you're authenticating them into the chat product which is separate from support. With the way this is configured the user records though related, are not actually one and the same. Due to that, you're not going to be able to update the support user fields via the JWT auth into the chat product.

Have a wonderful day!

Eric Nelson | Manager - Developer Advocacy

0


Hi,

I have a similar requirement of updating a ticket/user custom field originating from chat sdk v2. Anyone having knowhow of doing that?

Thanks

Raman

0


It's now almost 2025.

 

Is there a solution to this now?


I'm setting up the chat widget and would like to pass custom fields in an authenticated way.

 

If I do it client side, the field must be editable by the client, which circumvents authentication and would allow a user to pass whatever values they want.

(https://developer.zendesk.com/api-reference/widget-messaging/web/core/#set-conversation-fields)

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post