<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chris Kennedy on Medium]]></title>
        <description><![CDATA[Stories by Chris Kennedy on Medium]]></description>
        <link>https://medium.com/@ckennedy_40396?source=rss-d894b237872------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*t-p7qPE1GW-cMmxbqf-iAQ.jpeg</url>
            <title>Stories by Chris Kennedy on Medium</title>
            <link>https://medium.com/@ckennedy_40396?source=rss-d894b237872------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:49:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ckennedy_40396/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simplifying Complex Workflows with Custom Objects]]></title>
            <link>https://medium.com/zendesk-developer-blog/simplifying-complex-workflows-with-custom-objects-1c6a8cc57ba7?source=rss-d894b237872------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c6a8cc57ba7</guid>
            <dc:creator><![CDATA[Chris Kennedy]]></dc:creator>
            <pubDate>Tue, 09 May 2023 20:11:50 GMT</pubDate>
            <atom:updated>2023-05-09T20:11:50.834Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3DwLYMRB0FNetLaTHZtE8A.jpeg" /></figure><p>With <a href="https://developer.zendesk.com/documentation/custom-data/custom-objects/getting-started-with-custom-objects/">Custom Objects</a>, customer data that doesn’t fit neatly within native Zendesk objects (organizations, users, tickets, etc.) can be stored in Zendesk to enhance your workflow. This is particularly useful for organizations that have multiple factors to account for within their support workflow. When things like job function, agent location, customer location, and evolving business processes all matter to the day-to-day operations, handling tickets with just Zendesk objects and business rules alone can get overly complicated.</p><p>Let’s follow an example of how to smooth those complexities out with custom objects:</p><p>Facilities Management Company (FMC) has customers that send service requests for their facilities to Zendesk Support agents to take action on. FMC serves large customers who have many facilities across different regions. So for the most efficient, customer-friendly workflow, teams of agents only focus on requests from specific regions that they’re assigned to cover. FMC is also growing fast. Flexibility must exist for teams’ coverage area assignments to shift based on need.</p><h4>Challenges</h4><p>At first glance, there are a few challenges with implementing a clean workflow for the agents within Support:</p><p>Agents only service requests for regions in their coverage area. It’s tempting to represent this coverage area assignment with an agent group. But there needs to be the flexibility to change the assignments, which could complicate group management for admins. It could also limit the ability to organize agents into groups based on job function (Maintenance, Janitorial Services, IT, etc.)</p><p>Customers also have individual facilities, each with unique details relevant to the service agent. For customers with dozens of facilities, it’s difficult to work with all of this info from a single organization profile. And they often have service locations across many regions.</p><p>To reduce complexity for teams, let’s add custom objects to the mix to create more meaningful relationships between key operational data, tickets and the groups of agents that support customers in them. This will help FMC’s workflow stay effective and scalable.</p><h4>Modeling</h4><p>There are a number of ways to try to structure data for this workflow. But for the custom data we add to Zendesk, let’s focus on only what is relevant to agents handling the requests. Agents need:</p><ul><li>Access to external data about the individual facility in the request</li><li>The service coverage region the facility is in</li><li>The service coverage regions they are assigned to</li></ul><p>To represent the facility and region data that will be stored in Zendesk, we’ll set FMC up with two custom object types:</p><ul><li><em>Location</em> for the facility location</li><li><em>Region</em> for the service coverage area</li></ul><p>To tie these together, we’ll design a few one-to-many relationship types that describe how the location or region interacts with the other relevant objects in the workflow.</p><ul><li>The <em>Location Region</em> relationship represents the set of locations within a region.</li><li>The <em>Ticket Location</em> relationship represents the possible service request tickets that may reference a location.</li><li>The <em>Coverage Group</em> relationship represents the set of regions that an agent group supports.</li><li>The <em>Org Location</em> relationship represents the set of locations that an organization has.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7W0ETEcl628XkVhyZPFoA.png" /></figure><h4>Implementation</h4><p><strong>Legacy Custom Objects</strong></p><p>With Legacy Custom Objects, FMC will need to create the objects, relationships and records via API.</p><p>To start, add the <a href="https://developer.zendesk.com/documentation/custom-data/custom-objects/getting-started-with-custom-objects/#defining-a-legacy-custom-object-type">object types</a>. Location will have name (required), address, and notes properties. Region will have a required coverage area property.</p><p>Location:</p><pre>{<br>  &quot;data&quot;: {<br>    &quot;key&quot;: &quot;location&quot;,<br>    &quot;schema&quot;: {<br>      &quot;properties&quot;: {<br>        &quot;name&quot;: {<br>          &quot;type&quot;: &quot;string&quot;,<br>          &quot;description&quot;: &quot;Facility Name&quot;<br>        },<br>        &quot;address&quot;: {<br>          &quot;type&quot;: &quot;string&quot;,<br>          &quot;description&quot;: &quot;Facility Address&quot;<br>        },<br>        &quot;notes&quot;: {<br>          &quot;type&quot;: &quot;sting&quot;,<br>          &quot;description&quot;: &quot;Key Property Notes&quot;<br>        }<br>      },<br>      &quot;required&quot;: [&quot;name&quot;]<br>    }<br>  }<br>}</pre><p>Region:</p><pre>{<br>  &quot;data&quot;: {<br>    &quot;key&quot;: &quot;region&quot;,<br>    &quot;schema&quot;: {<br>      &quot;properties&quot;: {<br>        &quot;coverage_area&quot;: {<br>          &quot;type&quot;: &quot;string&quot;,<br>          &quot;description&quot;: &quot;Coverage Region Name&quot;<br>        }<br>      },<br>      &quot;required&quot;: [&quot;coverage_area&quot;]<br>    }<br>  }<br>}</pre><p>Next, add the set of one-to-many <a href="https://developer.zendesk.com/documentation/custom-data/custom-objects/getting-started-with-custom-objects/#modeling-your-data">relationship types</a> that will be used.</p><pre>|  Source Object Type  |  Target Object Type  |<br>|----------------------|----------------------|<br>|  region              |  location            |<br>|  location            |  zen:ticket          |<br>|  zen:group           |  region              |<br>|  zen:organization    |  location            |</pre><p>Once this is done, FMC can start creating location and region records from their property management system and coverage group records from their workforce management system.</p><p><strong>New Custom Objects</strong></p><p>We have an exciting <a href="https://support.zendesk.com/hc/en-us/community/posts/5359269969178-What-is-the-new-Custom-Objects-EAP-">New Custom Objects</a> experience that simplifies creating the objects, relationships and records. With this new experience, FMC can build the objects and add records directly from <a href="https://support.zendesk.com/hc/en-us/articles/5392409465370">Admin Center</a>.</p><p>It also introduces <a href="https://support.zendesk.com/hc/en-us/articles/4591924111770">Lookup relationship fields</a> to simplify establishing relationships. With this powerful addition, FMC can create Org Location, Location Region, and Ticket Location lookup fields for easy relationship management between these objects that can be done from the agent interface.</p><h4>Using an app to display the custom data to agents</h4><p>To give the agents the ability to interact with this new data directly from a ticket, create a <a href="https://developer.zendesk.com/documentation/apps/build-an-app/build-your-first-support-app/part-1-laying-the-groundwork/">Support app</a>. Depending on the specifics of the support flow for the customer, this app will give the agent the info they need to route the ticket in the sidebar. For example, if the customer submits requests with their building’s facility ID, we can store this ID on the location record when adding locations. Then the ticket sidebar app can fetch the location and related region/coverage groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufsc9cn0ylKYuoxWPrwlPw.png" /></figure><p>There’s also flexibility to add other features as the workflow evolves — like using the organization to fetch all locations and give the agent the ability to manually select the ticket’s location. Or <a href="https://developer.zendesk.com/api-reference/apps/apps-support-api/ticket_sidebar/#ticketassignee">automatically</a> selecting a group in the agent interface. This gives triaging agents the necessary context about the service request and the groups that are best suited for serving it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c6a8cc57ba7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zendesk-developer-blog/simplifying-complex-workflows-with-custom-objects-1c6a8cc57ba7">Simplifying Complex Workflows with Custom Objects</a> was originally published in <a href="https://medium.com/zendesk-developer-blog">Zendesk Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zendesk Custom Pages: Sending Email Notifications]]></title>
            <link>https://medium.com/zendesk-developer-blog/zendesk-custom-pages-sending-email-notifications-f5bb77ab53e6?source=rss-d894b237872------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5bb77ab53e6</guid>
            <dc:creator><![CDATA[Chris Kennedy]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 20:14:45 GMT</pubDate>
            <atom:updated>2022-04-01T20:37:29.064Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*jALvEl0Ha6jq1cx02u4czw.jpeg" /></figure><p>In this feature demonstration, we’ll dive into the specifics of the backend for our Zendesk custom pages single page app built with Node.js and Express. Using this app, end users can sign up to become a VIP member and receive tailored support for their organization.</p><p>Here we’ll break down using our backend app to send a confirmation email notification to the user once the user and organization profiles have been upgraded to VIP.</p><p>This article is part of a wider family of articles exploring Zendesk custom pages. You can find out more about other technologies we used and their implementations into custom pages below:</p><ul><li><a href="https://medium.com/@erica.girges/f7dfdf1dd259">How We Built: the VIP Support Custom Page</a></li></ul><p>It might also be helpful to check out these articles that demonstrate other backend features we implemented on this project such as JWT authentication and Zendesk user creation. You can find those below:</p><ul><li><a href="https://medium.com/@ckennedy_40396/7013c85eebe5">Zendesk Custom Pages: Backend Lead Request Intake</a></li><li><a href="https://medium.com/@tipene.hughes/4448e2830caf">Zendesk Custom Pages: Backend User Creation</a></li></ul><p>To build out this feature, we’ll set up a <a href="https://github.com/zendesk/custom-pages-example/blob/main/backend/mailer.js">mailer.js</a> file to handle our tasks for sending the user a notification. Here, we’ll handle sender configuration, building the mail message and delivery in a really simple way with the help of <a href="https://www.npmjs.com/package/nodemailer">nodemailer</a>.</p><p>Let’s create a notifyUser function that our app will call to supply the recipient’s email address and deliver the notification. In notifyUser(), we’ll start by specifying the <a href="https://nodemailer.com/smtp/">SMTP transporter</a> for sending the message. There are a range of possible options for this, but here we use Gmail. Then we configure the from/to addresses, the subject and email body.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4501a204b7429b7ad7d00bff2b59b49d/href">https://medium.com/media/4501a204b7429b7ad7d00bff2b59b49d/href</a></iframe><p>For the message body, let’s pass an external HTML template to the configuration for a nicely formatted notification. You can take a closer look at it <a href="https://github.com/zendesk/custom-pages-example/blob/main/backend/template.html">here</a>. Once that’s set up, all that’s left for notifyUser() to do is send the email to the recipient using the configuration and log any mail delivery errors.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5f9d26f39dcc3d19883792b23a3fc4a/href">https://medium.com/media/b5f9d26f39dcc3d19883792b23a3fc4a/href</a></iframe><p>Now our Express app can send out a confirmation email notification to the user by simply supplying the user’s email address to notifyUser().</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5bb77ab53e6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zendesk-developer-blog/zendesk-custom-pages-sending-email-notifications-f5bb77ab53e6">Zendesk Custom Pages: Sending Email Notifications</a> was originally published in <a href="https://medium.com/zendesk-developer-blog">Zendesk Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zendesk Custom Pages: Backend Lead Request Intake]]></title>
            <link>https://medium.com/zendesk-developer-blog/zendesk-custom-pages-backend-lead-request-intake-7013c85eebe5?source=rss-d894b237872------2</link>
            <guid isPermaLink="false">https://medium.com/p/7013c85eebe5</guid>
            <dc:creator><![CDATA[Chris Kennedy]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 20:14:31 GMT</pubDate>
            <atom:updated>2022-04-01T20:33:37.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*XXuPcd3jvZeh79ZHmdj5pg.jpeg" /></figure><p>In this feature demonstration, we’ll dive into the specifics of the backend for our Zendesk custom pages single page app built with Node.js and Express. Using this app, end users can sign up to become a VIP member and receive tailored support for their organization.</p><p>Here we’ll break down handling submission of the front end form data in our Express app, including using JWT authentication to secure submission endpoint.</p><p>This article is part of a wider family of articles exploring Zendesk custom pages. You can find out more about other technologies we used and their implementations into custom pages below:</p><ul><li><a href="https://medium.com/@erica.girges/f7dfdf1dd259">How We Built: the VIP Support Custom Page</a></li></ul><p>It might also be helpful to check out these articles that demonstrate other backend features we implemented on this project such as Zendesk user creation and email notifications. You can find those below:</p><ul><li><a href="https://medium.com/@tipene.hughes/4448e2830caf">Zendesk Custom Pages: Backend User Creation</a></li><li><a href="https://medium.com/@ckennedy_40396/f5bb77ab53e6">Zendesk Custom Pages: Sending Email Notifications</a></li></ul><p>To start, let’s create a route to handle POST requests to the /submit path. This will serve as the endpoint for the frontend to submit its lead request form data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59ff19e1df2b02d6f3ce3c994512c15e/href">https://medium.com/media/59ff19e1df2b02d6f3ce3c994512c15e/href</a></iframe><p>On POSTs to /submit we’ll call a validateData function to validate the POST data received in the request. The request and response objects are supplied to validateData() for access to the POST data, and to allow it to send an error response if validation fails.</p><p>In validateData(), let’s check the email, name and organization values submitted by the frontend. The validator library helps us perform some specific checks very easily. We’ll ensure that:</p><ul><li>Email is formatted as an email address</li><li>Name is 4–60 characters long</li><li>Organization is 4–80 characters long</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bae2bca979e3e6283ad11509ccd2ae1/href">https://medium.com/media/7bae2bca979e3e6283ad11509ccd2ae1/href</a></iframe><p>If validation fails, send a 400 response with a message specifying the failure. If the data passes validation, start the process to create or update the user and organization in Zendesk Support.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b635311e4e33db31741866554a3c4a2/href">https://medium.com/media/9b635311e4e33db31741866554a3c4a2/href</a></iframe><h4><strong>Authentication</strong></h4><p>Now that we have an endpoint for the frontend to submit its form data to, let’s add authentication to secure it. To do so, we’ll create a system user and a secret key for the frontend to send in an authentication request. On successful authentication, we’ll use <a href="https://jwt.io/introduction">JWT</a> to generate a token for the frontend to authorize its request to /submit.</p><p>Let’s create an <a href="https://github.com/zendesk/custom-pages-example/blob/main/backend/auth.js">auth.js</a> file to build out the functions needed to authenticate, generate JWT tokens and verify JWT tokens. We’ll work with the <a href="https://www.npmjs.com/package/jsonwebtoken">jsonwebtoken</a> library for signing and verifying the tokens.</p><p>First, we’ll define a generateToken function that allows the frontend to request a JWT token to authorize its request to /submit. The frontend will send the system user’s key in a request to our app in order to authenticate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8914b1ab4dffe71a6e3cd04da01a6d83/href">https://medium.com/media/8914b1ab4dffe71a6e3cd04da01a6d83/href</a></iframe><p>We’ll supply the request and response objects to generateToken() so it can check that submitted key and respond with an error if it’s invalid or a JWT token if it’s valid. When the key is valid, jsonwebtoken’s sign method will return the JWT token and send it in the response.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbde62efdbf178db8a096bce73da80d1/href">https://medium.com/media/dbde62efdbf178db8a096bce73da80d1/href</a></iframe><p>Next, let’s build out an authenticateToken function that will serve as a middleware function to protect the /submit endpoint. We’ll have it check the /submit request for the JWT token and verify it.</p><p>To do so, parse the request’s Authorization header to get the JWT token.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee6da0f37ee9eda9214454dbb0634a6c/href">https://medium.com/media/ee6da0f37ee9eda9214454dbb0634a6c/href</a></iframe><p>Then use jsonwebtoken’s verify method to verify it. If it’s invalid, respond with an error. Otherwise, allow the /submit route to proceed with validating the form data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0149d1c07646488f98bb73a70966238/href">https://medium.com/media/f0149d1c07646488f98bb73a70966238/href</a></iframe><p>To use these functions in our app, let’s return to our app.js file and import the auth.js file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f533392d0a8dd58c510ca2cfaa93a208/href">https://medium.com/media/f533392d0a8dd58c510ca2cfaa93a208/href</a></iframe><p>We’ll create an /authenticate route for the frontend to POST the system user key to. It’ll call generateToken() to handle the key verification and JWT token generation tasks we defined.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a04809e54e9e59cb57eaf4ba69b8f958/href">https://medium.com/media/a04809e54e9e59cb57eaf4ba69b8f958/href</a></iframe><p>Finally, let’s return to our /submit route and update it to add authenticateToken(). This ensures that requests to /submit are authorized with a valid JWT token.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/314e86db145298207d41e94509e08e27/href">https://medium.com/media/314e86db145298207d41e94509e08e27/href</a></iframe><p>Now our Express app is ready to accept form submissions from the front end and start the process to <a href="https://medium.com/@tipene.hughes/4448e2830caf">create or update the user and organization</a> in Zendesk.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7013c85eebe5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zendesk-developer-blog/zendesk-custom-pages-backend-lead-request-intake-7013c85eebe5">Zendesk Custom Pages: Backend Lead Request Intake</a> was originally published in <a href="https://medium.com/zendesk-developer-blog">Zendesk Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>