Astrato supports passing filters, variables, and more into both embedded and non-embedded URLs for workbooks. This capability allows you to dynamically adjust the content and actions of your workbooks based on the parameters in the URL. Here's how you can achieve this:
Embedding Filters in URLs
For Workbooks (included embedded):
Create the URL: Construct a URL for your workbook/embed URL and append the desired filters and variables as query parameters.
https://app.astrato.io/your-workbook?queryFilter=Default/Territory/'Sales Country' in ('Australia', 'Canada') and Default/'Product Category'/'Product Category' in ('Bikes')
Passing variable values
An workbook or embed link can include values for variables defined in the workbook.
This can be used to control the display of the content by showing and hiding objects, setting the titles of objects, showing different languages for different users, and more.
You can append a variable value to a link by adding the variable tag to your URL. The variables added to the link are structured as follows:
?variable=variable_name:my name
For example:
?variable=vTop:10&variable=vIsMale:false&variable=vText:This is a nice app
This example sets the values for different variable types:
vTop a numeric variable, vIsMale a boolean variable, and vText a string variable
The example below combines passing a variable value and applying a filter on a field.
?variable=vTop:10&queryFilter=Default/Territory/'Sales Country' in ('Australia', 'Canada'
Executing Action Flows with URL Parameters
Listen for Parameters: Astrato workbooks are designed to listen for parameters in the URL. When the workbook is accessed, it will parse the query parameters and apply the corresponding filters or variables.
Execute Action Flow: After applying the parameters, you can set up an Action Flow to control what happens next. This gives you complete control over the behavior and changes in your workbook.
Set Up Action Flow: Define an Action Flow in your workbook settings to respond to the parameters passed in the URL.
Trigger Actions: Depending on the parameters, trigger specific actions or changes within the workbook for a fully customized experience.