Custom language allows you to supplement your narratives with custom insights specific to your business! Builders can leverage the analytics and data from the extension and apply their own language or sentence structure to create the most impactful story for the reader. As with the narrative as a whole, data/variables used in custom content are dynamic, adjusting along with the dashboard.
Adding Custom Content
To create custom content, open the 'edit' modal. At the bottom of each section is a button - "Add custom story item."
Type any custom content into the text box.
To insert variables or data points, select the fx button on the right of your custom content to add a function.
Select a function from the list of dropdowns and fill in the required fields. For example, if I wanted to know the month with the lowest profit, I would select MinLabel as my function and then designate the measure as ‘profit’. This would return the name of the month. If I wanted to know the profit value of that month, I would insert another function into my text called MinValue and follow the prompts given.
Determining exactly when and how to communicate certain information can be just as important as the information itself. As with our out-of-the-box content, custom insights need to account for different scenarios that may arise. For example, you may want to word the sentence differently if that figure was higher or lower than expected. Conditional statements allow the builder to introduce this kind of logic.
For each custom sentence, you have the option to use a conditional statement to govern whether or not the sentence writes. To adequately cover all the scenarios that might arise for a single insight, consider adding multiple variations (custom bullets/sentences) and apply conditional logic to each to ensure only the most appropriate scenario writes.
To the right of the custom language text box is an icon that will bring up the conditional logic. The conditional statement is set up as a True/False statement. If the condition is true, the custom language will write. If not, nothing will print.
Multiple conditions can be applied to each custom sentence, and can be combined using the "Any" or "All" toggle. This corresponds to "Or" and "And" statements, respectively.
Conditional statements are most often used with numerical comparisons, but it also supports string matching by using the equal (=) or not equal (!=) symbols.