Link Search Menu Expand Document

Content

Table of contents

  1. Overview
  2. Output Types
    1. Text
    2. Charts
    3. Tables
    4. Images
    5. Conditional
  3. Method
    1. Query
    2. API
      1. Salesforce
      2. Looker
      3. Tableau
      4. Google Sheet
    3. Static Input
  4. Multi-Dynamic Content
  5. Bulk Actions
  6. Best Practices

Overview

This page will give you a detailed overview of dynamic content. As a reminder dynamic content is what Matik inserts into the slides and is mapped to the tags. You need to ensure that the name of your dynamic content matches the name you inserted in the alt text of the tag in the slides. Note the name cannot have any spaces and must be unique. There are three types for dynamic content:

  1. Data-Driven - content connected to data sources filtered by the inputs selected
    1. Text - anything you would insert into a text object within PPT or Google Slides
    2. Charts - native charts that are supported within PPT or Google Slides - we currently support the following: bar charts, column charts, line charts, dual axis charts, and pie charts
    3. Tables - native tables in PPT or Google Slides
    4. Images - icons, profile pictures, etc.
  2. Static - predefined content either in text or image form, typically returning a the exact value selected in an input
    1. Text - anything you would insert into a text object within PPT or Google Slides
    2. Images - icons, profile pictures, etc.
  3. Conditional - returns another piece of dynamic content if certain criteria are met another piece of dynamic content if certain criteria are met

In addition to the output type, you will need to specify the below:

  • Method: how the dynamic content is created - query, API, or end user Input (value inputted by end user through Input)
  • Data Sources: the data used to create the dynamic content.


Output Types

Text

If you select Text as the dynamic content type then the data source can be any of the three listed above - Data Connector, or End User Input (Input)

If you are connecting to your database as a data source via one of our connectors, then you will have to write a SQL query to pull the data. The output of your SQL query needs to be a single value if the dynamic content type is set to Text. Within the SQL query you can use Inputs to customize the query. End users will be asked to input these Inputs which in turn will customize the query to fetch the appropriate data. See example query below:


-- SQL query for purchased seats.  `&:` represents a Input in the query

SELECT sum(purchased_seats) as total_seats
FROM postgresql.public.qbr_data
WHERE company_name = &:client_name
	and contract_id in &:contract_ids
	and quarter = &:qbr_date
	and time = 'Quarterly'

You can insert inputs within your SQL query by typing &:. An orange pill will appear above the SQL editor. If this is an Input that already exists, the color of the pill will be orange. However, if this is a net new input the pill will be grey. Click on the pill and a pane will appear that will allow you to customize the Input.


Charts

If you select chart as the type, then the data source can either be a database you connect to (i.e. Redshift, Snowflake, etc.), or a Google Sheet. If you connect to a database, you need to ensure that the number of columns in the output of your SQL query matches the number of columns of the Excel/Google sheet that is powering the chart in the slide. You can make additional edits to the chart after your presentation has generated, by right clicking the chart and selecting “Open Source.” You’ll be redirected to the underlying Google Sheet that powers your chart. Once you make your changes directly in the Google Sheet, go back to your presentation and press the “Update” button on your chart to sync those changes.

Below is the SQL query that generates the data to fit the schema represented in the Excel spreadsheet above:


-- SQL query for a bar chart

SELECT
	quarter as category,
	sum(presentations_created) as presentations_created
FROM postgresql.public.qbr_data
WHERE time = 'Quarterly'  
       and company_name = &:client_name
       and contract_id in &:contract_ids
GROUP BY 1
ORDER BY 1 ASC
LIMIT 3

You can also power charts with BI tool or other API connection data sources in which the Fields to Return represent columns in the spreadsheet linked to the native chart.


Tables

Similar to charts, tables are powered by a SQL query. The output of your SQL query needs to match the table you inserted into the slide. Note that column names in your SQL query need to match the column names you have in your table

Images

Images can be dynamically inserted into slides. You can retrieve an image via the API method or via a URL that is stored in a database that you retrieve via a query.

Conditional

Conditional dynamic content allows you to insert another piece of dynamic content based on Input values selected by the end user. For example, let’s say you have “objective” as a paramter which is a dropdown of 5 values. You can create conditions that specify which dynamic content is returned based on which values are selected by the end user. Within a condition group you will select the Input and set the associated criteria to be evaluated. Note that you can add mulitple conditions within a group which will be treated as an AND statement. If you add another condition group then the dynamic content associated with the first condition group that returns true will be inserted. Matik currently supports the following operators for conditions: =, !=, > , < , >=, <=, contains, does not contain, in, not in.

Method

As we described at the top of this page, method denotes how the dynamic content is created. Currently we support one of the following options: Query, API, or end user Input.

Query

If you select query then you will need to input SQL syntax to create the dynamic content. See example above under the text section.

API

If you connect to a third party application like Salesforce as a datasource, then you can create the dynamic content by leveraging their API. If selected, the UI below will appear which you will need to populate.

Salesforce

You will need to specify the object in Salesforce that the data is coming from, filters, how to order the data returned, and the specific fields that you want the API to return. Note within the filter section you can apply Inputs that will get exposed to the end user. In the example below, users will need to input the sfdc_account_name Input in order to fetch the proper data.

You can also pull directly from a Salesforce report by selecting “Reports” as the Source, and then choosing the specific Salesforce report you want to use to create the dynamic content. See the example below for reference.

Note that Salesforce has limits on the amount of API requests you can make in a 24 hour period. To see how many request you have go to Setup > Company Information

Also note that Matik date Inputs output values of type date in Salesforce. In order to filter on a datetime field, you’ll need to either convert the field to type date, or use the DAY_ONLY() function in the Salesforce SOQL query interface in Matik.

Looker

Note: you may need to whitelist our IP address (54.177.196.112 and 54.219.155.184), if you use a VPN to connect to these data sources.

Our Looker integration offers a simple point-and-click wizard to pull in data from your published dashboards. Once you have connected Looker as a data source, you will go through a wizard as seen above. Please note: the connected account should have read access to required dashboards. We recommend having fewer than 50 dashboards visible to that account to prevent slow loading.

Start out by naming your content, giving it a description, and adding any tags as necessary. Then select Looker as the data source.

Scroll down and select whether you want to connect to a dashboard or a model and then specify which dashboard or model you want to pull data from. If you select a dashboard you will be prompted to select a dashboard query (this is an element on that particular dashboard).

Once you select a dashboard query, Matik will automatically fill in the underlying fields that power that element on the dashboard. You can edit this by selecting and deselecting fields to further customize your content. The fields available to customize are listed below:

  • Filter: Add filters to the data - these are the Inputs that end users will have to populate in order for Matik to pull this data (i.e. %:account_name).
    • Tips:
      • If no filters are specified, filters currently applied to your Looker dashboard will be applied.
      • Dates can be filtered by using all relative date formats available in Looker. (e.g. date_time = last year)
  • Sorting: Add sorting criteria to choose how you want your data to be ordered.
  • Pivot: Select a field in the underlying query to pivot the data by.
  • Result size: Apply a limit to the amount of data returned.
  • Timezone: If needed, choose a timezone for the query data.
  • Fields: Select the fields from the underlying query that you want Matik to return.
    • Tips:
      • By default, all fields in the dashboard are selected.
      • You can rename any field by clicking on the field name and typing in a new field alias.
  • Apply Looker Formatting: By selecting this toggle, you will apply the current Looker field formatting to the output of data pulled by/in Matik.

Tableau

Our Tableau integration offers a simple point-and-click wizard to pull in data from your published dashboards. Once you have connected Tableau as a data source, you will go through a wizard as seen below.

Start out by naming your content, giving it a description, and adding any tags as necessary. Then select Tableau as the data source.

Scroll down and select which Tableau Workbook you want to connect to, and then specify which View (i.e. a dashboard worksheet) you want to pull data from. Please wait for the dashboards to load if you don’t see them immediately.

Note that views that aren’t published can’t be accessed by our API and therefore won’t appear in the list options. In order to select them, publish them first in your Tableau instance.

Select which fields you want Matik to return, and then further customize the content with the following fields:

  • Filter Returned Fields: Any field in your selected View will be available here. By default, all returned fields will have the filters applied to them that are found in the dashboard. Adding further filters will further filter the worksheet view selected or overwrite existing filters.
    • Tips:
      • You can rename any field by clicking on the field name and typing in a new field alias.
  • Filter: Add filters to the data - these are the Inputs that end users will have to populate in order for Matik to pull this data (i.e. %:account_name).
    • Tips:
      • Tableau dates must be formatted to YYYY-MM-DD to use the date picker Input.
  • Sorting: Add sorting criteria to choose how you want your data to be ordered.
  • Result size: Apply a limit to the amount of data returned.

Google Sheet

If you use Google sheet as a data source, there are two steps to go through: 1) Define Inputs and 2) Define Output. Inputs are basically Inputs that get passed to the Google sheet. Input the cell reference and then in the adjacent box input the Input name as seen below (Inputs start with &: followed by the name - to learn more, go to the Inputs page). The output is basically what you want Matik to pull from the Google sheet to insert into the slide after the inputs have been populated. This can be a single cell or even a range of cells.

For example, if you had a Google sheet as a pricing calculator, you could add inputs for number of licenses that would get inputted by the end user and passed into the calculator. The screenshot below is the calculator in Google sheet. Per the above screenshot the end user would input the number of licenses and Matik would send the value to cell C5 (red border) and would then pull the contents of cell F7.

Static Input

If you select end user input as the method, you will then only have to select an input. The values selected or inputted as Inputs by end users can be inserted as static content. For example if one of your Inputs for a template is client name, then the value selected by the user can be used as dynamic content:

Multi-Dynamic Content

You can also create one piece of dynamic content that powers multiple tags within a template. Let’s say you have 3 metrics that you want to display on a slide and all three metrics come from the same data source. Instead of creating three different pieces of dynamic content (one for each metric), you could create one piece of dynamic content that outputs all three. For example, let’s say you created a piece of dynamic content called company_seat_stats and you used the SQL query below:


-- dynamic content name: company_seat_stats
SELECT 
	company_name, 
	purchased_seats,
	activated_seats,
	active_seats
FROM postgresql.public.qbr_data
WHERE company_name = &:client_name
	and contract_id in &:contract_ids
	and quarter = &:qbr_date
	and time = 'Quarterly'

The output of the query above would yield a row that has 4 columns. When you mark up the template with the tags, you can specify the specific column you want to extract by inputting the following syntax {{dynamic_content_name.column_name}}

By adding the “.column_name” you are telling Matik that you only want that piece of data inserted into the tag instead of the entire row. Note that the ouput of your query can not return multiple rows since Matik want know which row to choose from.

Bulk Actions

Bulk Actions allows you to make multiple changes to dynamic content, permissions, data sources and tags in one go, instead of having to update each piece of content individually.

To apply bulk actions to dynamic content, navigate to the “Dynamic Content” tab, select the pieces of content you wish to update, and then select your bulk action. You can select “Manage Access,” “Manage Tags,” or “Update Data Source.”

To apply bulk actions to permissions, select “Manage Access.” You can share the content with new users, or adjust viewing and editing permissions for existing shared users. When you’ve finished making all of your changes, press “Close.”

To apply bulk actions to tags, select “Manage Tags.” Add or remove tags to re-categorize and organize your content. Then, press “Save” to save your changes.

To apply bulk actions to data source updates, select “Update Data Source.” Search for the data source you would like the piece of content to pull from, select it, and press “Save.” Note that this option will only be available if you select pieces of content that are tied to the same data source.

Best Practices

For Query-based dynamic content, it is important to test queries on your preferred query editor in order to optimize for speed. Queries with runtimes over 30 seconds should be examined for ways to improve performance. These strategies could include:

  • Aggregating tables to smaller, more performant sizes,
  • Reviewing order of JOINs to ensure largest tables are joined first,
  • Optimizing data transformations and aggregations.

Another way to improve performance is to use multi-dynamic content which produces several data-points to eventually be used in tags, instead of one query powering one tag in the template.

For spreadsheet-based dynamic content, we recommend creating a separate tab in your spreadsheet which contains all of your output cells that are referenced in Matik. In doing so, any changes to your spreadsheet (adding or deleting rows and columns) will not affect the cells referenced in your spreadsheet-based dynamic content.