flowchart TD
subgraph Zammad
ZammadEvents[Ticket Events<br>and Interactions]
end
subgraph CubeJS
CubeJSAPI[Cube.js API]
ZammadApi[ZammadApi Class<br>for Webhook Validation]
Postgres[Postgres Database]
UserAuth[User Authentication<br>with Zammad API]
UserInteraction[User Interaction<br>with Cube.js]
end
subgraph Users
AuthorizedUser[Authorized User]
end
ZammadEvents -->|1. Zammad Webhook<br>Reception| CubeJSAPI
CubeJSAPI -->|2. Cube.js Webhook<br>Validation| ZammadApi
ZammadApi -->|Valid Payload| Postgres
Postgres -->|3. Updating Postgres<br>Database| UserAuth
UserAuth -->|4. User Authentication<br>in Cube.js| UserInteraction
UserInteraction -->|5. User Interaction<br>with Cube.js| Postgres
AuthorizedUser -->|Valid Credentials| UserAuth
In this integration, Cube.js serves as a middleware between Zammad, an open-source ticketing system, and an Postgres database. The key functionalities encompass the reception and validation of Zammad webhooks, updating an Postgres database based on the webhook data, and authenticating Cube.js users.
Whenever events that are being tacked occur in Zammad, such as User updates, Zammad dispatches webhooks to Cube.js. These webhooks encapsulate pertinent data regarding the events.
Upon receipt of a Zammad webhook, Cube.js employs the ZammadApi
class to validate the webhook payload. The validation process checks for the presence of required fields and ensures the integrity of the data received from Zammad.
If the Zammad webhook payload proves valid, Cube.js processes the data and effectuates updates to an Postgres database. This database likely houses information pertinent to Zammad tickets, user interactions, or other relevant data.
During user interaction with Cube.js, the application verifies their credentials using the Zammad API. This entails the establishment and validation of Zammad API tokens to authenticate Cube.js users.
Once authenticated, users can engage with Cube.js functionalities, such as querying data or performing analytics. Cube.js ensures that only authorized users possessing valid Zammad credentials can access and manipulate the data.
Demo App: Cube.js Zammad Integration Demo