Displaying data from a PostgreSQL database in Zendesk
We’ve created FactBranch to display customer data in Zendesk when an agent opens a ticket. We load that data from APIs, spreadsheets or databases and over time our database integrations have become extremely popular. Which makes sense because they offer maximal flexibility and are easy to use.
Now we’ve added a completely new SQL editor, that allows you to write your own SQL queries and try it out with test data. Additionally we’ve built an output designer that lets you rearrange and rename results, add dynamic links and even define your own HTML-templates.
This is a quick guide for how to write an SQL query in FactBranch and design the results to be most helpful to your agents. You can find a more in-depth guide on how to display PostgreSQL data in Zendesk in the FactBranch docs.
If you use Amazon Redshift or Amazon Aurora with Postgres, this guide applies too!
This is what FactBranch looks like in Zendesk:
1) Getting started
First you need a FactBranch account. If you haven’t signed up yet, you can create an account. Every account comes with a 14-day free trial.
2) Create the connection
After registration, select PostgreSQL from the list and you’ll be forwarded to the Postgres connector. Enter your database credentials and hit Test connection.
You’ll get either an error or a success message. Once you get a green success message, click on Save and continue to create the connection. You’ll be forwarded to the SQL editor.
3) Write the query
The FactBranch SQL editor consists of a big area where you can write your query and a smaller panel on the right where you can test your query.
On the right select the property by which you’d like to look up customers. If you select email address, use the placeholder %(email)s in your query. If you select phone number, then use %(phone_number)s and if you select custom field, use custom_field_3600000000 - where 360000000 is the custom field ID from Zendesk. For more info please also refer to the full docs on how to write a Postgres query in FactBranch.
Make sure to test your query in the test query area on the right and that you get a result where every field name is unique. Especially if you join multiple tables with the same field names, set different names for them in your SQL query.
Once you’re happy with the results, hit Continue.
4) Design the output
In the output designer you can rename field labels, rearrange items by dragging them around and create links from a query result.
To create a link, first move your mouse over the item and then click change type. Select link and you’ll immediately see the link in the preview.
You can also define your own HTML-template for the item. Click on change type and then select HTML. In the template you can write normal HTML code. But you can also use {{ label }} and {{ value }} to output the contents of the label and the value respectively.
Learn more about the HTML item type and how you can build maps, buttons and even forms in the FactBranch output designer docs.
5) Done
Once you’re happy with the preview, click Finish, install the FactBranch app from the Zendesk marketplace and enjoy how incredibly convenient it has become to answer tickets in Zendesk with FactBranch.
Questions or Feedback?
If you have questions about the app or need more specialized features, please email support@factbranch.com and we’ll find a way to help you.
And if this article made your life easier, please also share it on your favorite social network like Twitter, Facebook or LinkedIn! We love to read those posts by enthusiastic users.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
0 Kommentare