Skip to content

Instantly share code, notes, and snippets.

@jackscotti
Last active August 29, 2015 14:10
Show Gist options
  • Save jackscotti/0bdab5a237eb529e911c to your computer and use it in GitHub Desktop.
Save jackscotti/0bdab5a237eb529e911c to your computer and use it in GitHub Desktop.
I have 3 different flow paths
- Path #1 asks: age
- Path #2 asks: city, phone_number
- Path #3 asks: postcode and age
All the 3 redirect me to the same outcome.
If user provided phone_number and postcode should not see the phraselist (if comes from Path #2 or #3).
How I would do it in SA:
outcome :result do
precalculate :body do
unless (phone_number or postcode)
if age < 20
phrases << :less_than_20
else
phrases << :more_than_20
end
phrases
end
end
end
I have no way to do so in Smartdown. If Users is not coming through Path #2 and #3 phone_number and postcode cannot be used in a predicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment