Recent searches


No recent searches

Attaching custom objects to a profile and then displaying that information via Zendesk app

Answered


Posted Jun 16, 2021

Hello,

I was wondering if anyone could help me put everything that I have learned together.

I have created an object called "Kit" (a kit that we sell) with the property of "serial" (serial number). I have then created a user profile and am able to grab the user ID. I also know how to create a Zendesk app (using HTML and javascript). I am able to add the serial number via API. However, I am getting stuck here.

What I would like to do is figure out how to attach the "Kit" object to a user profile and then display the "serial number" via the Zendesk app in the user profile if this is possible. The more simple the app the better. 

TL;DR I just want to be able to see how to tie object data to a user profile and then display it via app in zendesk. 

Does anyone have any example code of how to do this?


1

2

2 comments

Hey Jon, 

Do you already have the object associated to the User object with a relationship? If so you'd just need to use the List Related Object Records endpoint with the User ID. 

  function userKits(client, id) {
var kits = {
url: '/api/sunshine/objects/records/zen:user:' + id + '/related/{relationship_type}',
type:'GET',
dataType: 'json',

};

From there you just parse and display the data in the object record you want to show. 

If you don't yet have the user associated to an object record, then you'd need to set up your relationship type, and then have a mechanism to associate the two

Matt

2


This was very helpful! Thank you @...!

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post