Using ZAFClient to update end-user profile fields in private app
Hi Guys and Girls,
I've created an app in Zendesk that pulls information from one of our APIs then displays this info into the app.
I want to then take this info and update end-user Zendesk fields (name, account, email) and some custom fields using the same app but not sure how to do this exactly.
To begin with, I'm using
const client = ZAFClient.init();
Once I've done displaying end user info, I was thinking I should be using :
client.set(obj) to update the zendesk profile?
The 'obj' will have a full set of client data including custom fields.
Regards,
Gary
-
Hi Gary Kester
You are on the right track. See this to explain the user object. The path to the user object will depend on your app location. For example, to set user custom fields of the ticket requester for a ticket_sidebar app:
client.set('ticket.requester.customField:fieldName', value)
Hope this helps.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
1 Kommentare