Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 5, 2023 4:21:34 AM
Sep 27, 2022 3:52:22 AM
Table of content:
Qlik Application Automation was released in Qlik Cloud on September 28th, 2021, and has helped many customers take action on their data and automated numerous operational day-to-day workflows.
One of the key use cases we’ve seen in the first year is the writeback use case where users can, from a single click on a Qlik Sense dashboard, add, correct, or update data into their operational system (e.g. Salesforce, Jira, HubSpot, Service Now) or into the data platform (e.g. Snowflake, MySQL) used for the data load.
On April 20th 2023 we released a new Qlik Sense Button that has improved functionality to trigger an automation - see https://community.qlik.com/t5/Official-Support-Articles/How-to-build-a-write-back-solution-with-nati... |
In this article, we want to share an overview of the current building blocks for writeback use cases that are natively available in Qlik Cloud by using the power of Qlik Application Automation.
In short, we have two mechanisms to execute an automation from a Qlik Sense Sheet.
In the 'Actions' menu item from the native button, the option 'Execute automations' will link a button natively to an automation. More information on triggering an automation from the native Qlik Sense button can be found here: https://community.qlik.com/t5/Official-Support-Articles/How-to-build-a-write-back-solution-with-nati...
Why choose this option? |
Current Limitations |
|
|
By making your automation triggered, you allow any system to connect to your automation. Inputs and data can be shared through the URL as query string params (get) or the body (post).
In a Qlik Sense Sheet, you can link a triggered automation in a button by using the 'open website or email' option in the navigation section, or by adding the link in a straight table. Details of these two options are shared below.
Why choose this option? | Current Limitations |
|
|
In this example, we have a list of opportunities that can be selected and assigned a new opportunity stage.
The website URL configuration consists of :
Example:
https://<tenantname>/api/v1/automations/<automation_id>/actions/execute?X-Execution-Token=<token>&stage=' & GetFieldSelections([Stage Enum]) & '&opportunity_id=' & GetFieldSelections(Id) & '&user=' & SubField(OSUser(), '=', -1)
The same approach can be used as in Example 1, where we now configure the trigger URL as a column for each action option. The user will only be able to update one record at a time but does not need to make any selection upfront.
The configuration steps for the additional columns are:
Example:
https://<tenantname>/api/v1/automations/<automation_id>/actions/execute?X-Execution-Token=<token>&stage=Open'& '&opportunity_id=' & [Id] & '&user=' & SubField(OSUser(), '=', -1)
There are extensions available leveraging the same underlying principles and providing the user with an easy-to-use input form. An example is a great extension built by the Qlik principle solution architect Riley MacDonald: https://github.com/rileymd88/automation-trigger
In many cases, the app will need to be reloaded when the source data is updated by the writeback. It is advisable not to reload the application from within a triggered automation, such as is done in the attached demo examples. A triggered automation that includes an application reload may fail when there are multiple users interacting with the application since parallel reloads of the same app are not possible.
We suggest using a separate automation to execute the reloads. This automation should be configured to run on a schedule. By doing this, the reloads can be scheduled at intervals and will pool multiple changes from writing back in the same reload. Database connectors and some other connectors have incremental blocks which allow you to only process new or updated records. Use these blocks in the automation to only perform a reload if any new or updated records were found.
Attached you will find a Zip file containing a demo application that shows different examples of how writeback can be implemented. Besides the application and the automations you will also find the required MySQL table data in CSV format for import.
Configuration of MySQL
Configuration of load script sections in this application
Configuration of the automation
Triggered automation - Open a website or email.
Required block configurations:
Triggered automation - Extension
Required block configurations:
Execute automation - Native button
Required block configurations:
Dear Qlik,
This implementation is interesting and could be really useful in some of our cases. However, I would like to know whether there is any implementations/workarounds for Qlik Sense Enterprise on Window, which does not require the QAA to execute such features.
Looking forward to hear from you. TQ.
Regards,
Jin
Hello @JinNgiu See Can Qlik Sense Write back to Database?
I recommend to post about your requirements directly in our Integration and Extension forum to connect with knowledgeable Qlik peers. Should you be in search of a bespoke solution, our professional services can help you.
All the best,
Sonja
Hi,
We are using an extension developed by Qloud Cover. It is build natively to create Writeback tables in Qlik sheets where you can interactively writeback from existing data in Qlik. One of the benefits of the product is you can choose between a SaaS product or self-hosted. You can configure where to store the data and they support datastores like Snowflake, Redshift BigQuery and AWS Redshift. You can read more about the product at the Qloud Cover website:
https://qloudcover.com/qloud-cover-writeback/
Or you can create a free trail on the product website https://writeback.qloudcover.com/ and get easily started.
@christofferkristensen Thanks for sharing. This seems very helpful 🙂