Branches are IF-THEN-ELSE statements based on your data. They are your way to write a word or phrase, but only under certain conditions, or rules. And otherwise, write a different word or phrase. You’ll use conditional logic to change what’s written in your narrative based on different scenarios that happen in your data. For example, if sales this period are higher than the previous period, you can write that sales “rose”. If sales are lower than the previous period, you can write that sales “fell”. And if sales have not changed from the previous period, you can write that sales were “flat”.
To create a Branch, you can highlight a word you want to change in your Wordsmith Template and click the Add Branch button, or just click the button to write text from scratch.
When the Branch window opens, you’ll see an empty space for the conditional rule and the text you want to write (or you’ll see the text you highlighted before creating the Branch). The gray box is where you’ll write your Branch rule, this is the IF statement. You’ll write the text you want in your Wordsmith narrative if that rule is true in the white box right under it. This is your THEN action. And you can select the option for “If none of the above are true, then write:” to write a word or phrase if your rules are not true. It’s sort of like a catch-all statement for anything that could happen outside of the rules you’ve written. It is your ELSE action.
When you start writing your rule in the gray box, a drop-down list of all of your Data Variables will appear. You can select those Data Variables from the list or type them out yourself. Once you’ve selected or typed the first Data Variable you want to use, you’ll see the operators available for that data. You can choose different operators for data that is a number, like adding and subtracting, from what you can for data that is text. If you're using True/False data, you can just insert that Data Variable into your rule. But if you're using any other data type, you’ll need to include a comparison (greater than, less than, or equal to) in order for your rule to be evaluated as true or false. You can set up as many rules in a Branch as you want, and only the first true option will be written.
To create a Branch for our example of sales rising, falling, or staying flat, we would start with the first rule:
“If sales are greater than previous sales, then write ‘rose’”.
Our second rule:
“If sales are less than previous sales, then write ‘fell’”.
And the else option:
“Or else write ‘stayed flat’.”
This is what it would look like all together.
Updated over 3 years ago