How to add custom objects In Zendesk Sunshine
The Zendesk Sunshine platform lets you connect and understand all your customer data wherever it lives. The Sunshine platform consists of the Custom Objects API, Profiles API, and Events APIs.
Today we will be focusing on the Custom Objects.
There are 3 types of data inside Zendesk:
Users
Organisations
Tickets
Zendesk Sunshine, among other things, allows you to add as many data sets inside your Zendesk as you wish. Reason for this is to have your data source of truth in one place to make your workflows easier.
You can use the Custom Objects API to create, read, update, and delete objects that you define yourself. You can also use it to define and manage relationships with other objects, including native Zendesk objects like tickets and users.
Scenario
Let’s imagine a retail business named “BigElectro” that sell electronics. It sells in 14 countries across Europe. Each country has a parent company and each parent company has as many as hundreds of subsidiaries.
Now, in this scenario, a parent country can be an Organisation inside Zendesk. Let try to use the data types already existent inside Zendesk - Organisations:
Zendesk Organisations
BigElectro UK
BigElectro UK1 - London
BigElectro UK2 - Birmingham
BigElectro UK3 - Manchester
…
BigElectro Germany
BigElectro Germany1 - Dresden
BigElectro Germany2 - München
BigElectro Germany3 - Berlin
…
Each country has its own subsidiaries and follows the structure above.
We can only have a 1 to 1 relationship amongst Organisations inside Zendesk. This route would mean having hundreds of Organisations which would be amazingly messy to manage in the long run. Not cool!
Imagine creating business rules for each organisation separately when you could create a single business rule for the parent organisation only.
We need to create a custom object inside Zendesk named “Subsidiaries“. An organisation can have multiple subsidiaries, thus we need a 1 to many relationship for organisations with Subsidiaries.
If I’ve lost your focus a bit, not to worry, there’s a demo video below where this will become more clear. It’s necessary to understand this scenario so the video will make more sense.
Zendesk USERS
Additionally, imagine that a client of BigElectro can buy an electronic device in London and automatically becomes a member of the “BigElectro UK1 - London” Organisation. If they buy another electronic device from Berlin while traveling , they also become a member of “BigElectro Germany3 - Berlin”. Therefore, a user can be part of multiple subsidiaries of BigElectro.
1 user has a 1 to many relationship with the custom object “Subsidiaries”
But how to add subsidiaries for a parent country and create 1 to many relationships for it? Luckily, this is where Zendesk Sunshine comes to the rescue.
Solution
We can use the Custom Objects API to create, read, update, and delete objects that you define yourself. You can also use it to define and manage relationships with other objects, including native Zendesk objects like tickets and users.
With the help of Zendesk Sunshine we need:
To create a custom Object “Subsidiaries“
Organisations to have a 1 to many relationship with “Subsidiaries”
Users to have a 1 to many relationship with “Subsidiaries”
In the video below I demo how to add a new custom objects inside Zendesk for the above scenario.
All that’s left to do now, is to add the data entries for these data types using the Zendesk Sunshine API.
Documentation
Zendesk Sunshine documentation here:
Zendesk Sunshine Custom Objects documentation here:
You can share the above with your developers to add the data entries or you can hire me and my team ( :