So, for example, you could annotate the sentence in the following way:
## intent: if-then
- If the number of [calories in an apple](calories) is [less than](comparator) the number of [calories in an orange](calories), then [eat an apple](eat)
So, you would have the overall intent specifying the sentence as an “if-then” sentence and three entities, one for calories, one comparison entity, and one entity for eat.
In the custom action (Actions), that would follow the “if-then” utterance of a user, you could extract those entities and call a function to retrieve the actual calories of the apple and orange.