Custom objects provide a way for Zendesk admins to build a product catalog with custom objects and then make the data available to agents, customers, business rules, and reporting.
Previously, admins might have attempted to use drop-down fields rather than ticket lookup relationship fields that point to a custom object to create a simple list of products.
This recipe uses custom objects, custom object record permissions, the data importer, lookup relationship fields, ticket triggers.
- Workflow goal
- Creating a custom object to use as a product catalog
- Configuring agent and end-user permissions for the product records
- Importing your products into the catalog
- Incorporating the new product catalog into your ticket forms
- Group agents by the types of product they support
- Creating ticket triggers to route requests based on the product selected
- Reporting on your product catalog workflow (EAP)
Workflow goal
ShoeLaLa is a shoe company that sells more than 5,000 models of shoes across multiple categories, such as running shoes, lifestyle shoes, boots, and sandals. As the Zendesk admin for ShoeLaLa, you've been asked to create a product catalog that can be used in the ticket form, so customers must select the specific shoe they have an issue with when submitting a complaint. You'll also use this information to help route tickets to the correct agents and improve reporting on product issues.
Creating a custom object to use as a product catalog
The first thing you need to do is create a custom object named Product, which will serve as your product catalog. Each record for the Product object represents a different shoe sold by ShoeLaLa.
- In Admin Center, click Objects and rules in the sidebar, then select Custom objects > Objects.
- Click Create object.
- Under Name enter Product, and under Plural display name, enter Products.
- Under Object key, enter product.
- Click Create object.
- Click the Fields tab, click Add field, and add the following fields:
- For the Type, select Drop-down and enter Style for the display name. Add your style values and tags, and then click Save and add another.
- For the Type, select Multi-line and enter Description for the display name. Click Save and add another.
- For the Type, select Checkbox and then enter Active for the display name. Click Save and add another.
- For the Type, select Multi-select and then enter Colors available for the display name. Add your color values and tags, and then click Save and add another.
- For the Type, select Multi-select and then enter Sizes for the display name. Add the possible sizes and tags, and then click Save.
- Click Save.
Configuring agent and end-user permissions for the product records
In this workflow, you want agents and end users to be able to view and select product records related to their tickets.
- In Admin Center, click Objects and rules in the sidebar, then select Custom objects > Objects.
- Click Product to edit the product object.
- Click the Permissions tab.
- For Customer, select View.
- Review agent permissions to access the object's records. On Enterprise plans, you can configure agent access to object records. On Team, Growth, and Professional plans, agent permissions are predefined.
For more details, see Configuring access to custom object records.
Importing your products into the catalog
When you use a custom object as a catalog, each product within the catalog is a record. In this scenario, you have an existing set of products that ShoeLaLa already sells that you need to import. For the purposes of this scenario, we're going to use the data importer. However, you can also use the Custom Object Records API to create records in bulk. In both cases, you can use object triggers and webhooks to keep your product data in Zendesk synchronized back to an external service, such as a sales CRM.
After the initial import, you can either perform additional bulk imports periodically or admins and agents can manually add new products as needed.
- Create a comma-separated value (CSV) file with columns for each of the object's fields you want to import values for, and add one product per row.
Make sure to include unique external ID values for each record to ensure you can update the records with the data importer and API in the future. For additional guidelines, see Creating a custom object records CSV file.
- In Admin Center, click Objects and rules in the sidebar, then select Tools > Data importer.
- Under Import type, select Create only.
- Under Target destination, select Product.
- Under File upload, drag and drop your file or click to upload and select your CSV file from the file browser.
- Click Next.
- Review the Field mapping list.
- If the field mapping is correct, click Next.
- If the field mapping isn't correct, click Back. Edit your CSV file to adhere to the format requirements, and then re-upload the file.
- Click Start import.
Incorporating the new product catalog into your ticket forms
Creating a ticket lookup relationship field named product
Lookup relationship fields are used to define how custom data is related to other objects within Zendesk. In this scenario, you want customers to select a product while submitting a ticket. That means the lookup relationship field must be created as a ticket field that points to the Product object.
- In Admin Center, click Objects and rules in the sidebar, then select Tickets > Fields.
- For the Display name, enter Product.
- Under Permissions, select Customers can edit.
This is the only option that allows the field to be visible as part of the request forms in the help center.
- Select Required to submit a request.
- Under Related object, select Product.
In this workflow, no filters are required for this lookup field.
- Click Save.
Adding the product lookup field to your complaint ticket form
After you create a custom ticket field, you must add it to your ticket form in order for agents and end users to use it.
- In Admin Center, click Objects and rules in the sidebar, then select Tickets > Forms.
- Create a new ticket form or edit your existing ticket form named Complaint.
- Select Editable for end users.
- Drag and drop the Product ticket field into the form.
- Click Save.
Group agents by the types of product they support
At ShoeLaLa, agents are grouped by the shoe styles they support. For example, one group of agents called Sports is responsible for handling all complaints related to sneakers, hiking boots, cleats, and so on, while another group of agents called Formal is responsible for handling complaints related to heels, loafers, fancy flats, and so on. This approach to grouping agents works well with this product catalog workflow.
- In Admin Center, click People in the sidebar, then select Team > Groups.
- Create or edit groups of agents to handle complaints based on shoe style.
Creating ticket triggers to route requests based on the product selected
Because agents are grouped by the styles of shoes they support, you can use the product style values as conditions in ticket triggers and automatically assign them to the correct group.
- In Admin Center, click Objects and rules in the sidebar, then select Business rules > Triggers.
- Create or edit a trigger.
- Under Conditions, click Add condition to set up the trigger to meet Any of the style conditions you want to assign to the group of agents.
For example, to assign all athletic styles of shoes to a group named Sports, you might use the following conditions:
- Ticket > Product > Style | Is | Running
- Ticket > Product > Style | Is | Hiking
- Ticket > Product > Style | Is | Cleat
- Under Actions, specify the following action:
- Ticket > Group | Sports
- Click Save.
Reporting on your product catalog workflow (EAP)
After setting up your custom object workflow, you can use Explore to create reports based on lookup relationship field data. Specifically, you can use attributes of related custom object records to quantify ticket data, such as number of tickets by product, style, or whether the product is currently available.
- Open Explore, or click the Zendesk Products icon () from any Zendesk product, then select Explore.
- Click the reports icon ().
- Click the New report button.
- Select the Support - Tickets dataset.
- Click Start report.
- Replace New report with Ticket number by shoe type as the report name.
- Under Metrics, click Add.
- Select Tickets > Tickets.
This appears as COUNT (Tickets) in the report's list of metrics.
- Under Columns, click Add.
- Select Ticket lookup relationships > Product - Style.
- Click Save.