In this guide, we'll walk you through the process of displaying data from your PostgreSQL database in the Zendesk app sidebar using FactBranch. FactBranch is a powerful tool to create user interfaces around your data and can be used in Zendesk Support, Zendesk Chat, and Zendesk Sell. This article also exists as a video guide which takes about 6 minutes to set up everything.
To get started, create a FactBranch account. Once you've signed up, you'll be directed to the initial screen where you'll see various options what you can use FactBranch for. For this guide, we'll select 'Show data in the FactBranch Zendesk app'.
Next, we'll set up a data pipeline. All data pipelines start with a trigger (in our case the Zendesk app) that receives data and forwards the data to the next node.
As our next node, we'll query our PostgreSQL database. Click on 'Create a node' and select 'PostgreSQL'. Here, enter your database credentials.
We recommend to create a special database user for FactBranch that has as few permissions as possible.
If your database runs behind a firewall, activate the option to run all requests from a static IP address and you'll get an IP address that you must allow access from in your firewall settings.
Now, write your SQL query. You can use placeholders in your Postgres query by copy/pasting the variable from the input data panel on the right.
Run the query against your database by clicking the "Run" button and check the results it returns. Once you're happy with the results, move on to the Display node.
Once we have our query results from the PostgreSQL node, they are automatically forwarded to the Display Node as its input data.
FactBranch has a handy feature called 'Generate a UI' which attempts to generate an HTML template based on your input data. Click that button to generate a first draft of your UI. You can of course edit the generated HTML to further customize the outputs. FactBranch uses a templating language similar to Jinja2 or Liquid. Don't forget to check out more advanced template techniques in our docs.
The final step is installing the FactBranch app in Zendesk. Go back to your data pipeline and look at the trigger's config page where you'll find links to the marketplace pages for our three apps in Zendesk and an API key needed for installation.
Copy this API key and go to Zendesk Support's marketplace page and click 'Install'. You will be asked for the API key—paste it here.
You can also enable role or group restrictions if you want only certain agents to display the app.
And that's it! You have successfully set up FactBranch to display PostgreSQL data in Zendesk Support. The same process applies for Zendesk Chat and Sell as well. To get started, create an account and start your 14-day free trial for a 14-day free trial.