Rules
Rules Overview#
Rules are if-then expressions that operate on provided data.
What data is provided to the action rules?#
- Client facts are always available to all rules (answers to question from any line)
- Data generated by specific actions, or their responses (i.e. Webhook, Rating, etc.), is available to rules of those actions only.
Rule Example #1:
Assume we have a line with a trigger "Get Quote" that defines an Email action (sends email every time quote is requested). To reduce the volume of emails, we want to create a rule to only send email when the client has more than 3 locations and annual revenue of at least $100M.
if "client has more than 3 locations AND annual revenue is at least $100M"
then "run this action"
As we mentioned earlier, client facts are always available to rules. Client fact is an answer to a specific question.
Client facts are provided as a map of key:value pairs, where a key is a QID, and the value is the answer.
Where do I find QIDs for questions?
In the Intake Builder of every line. Top of each question shows canonicalId (visible to users) and QID (visible internally).
For example, let's consider these two questions on a line:
| Question | QID (Question Identifier) |
|---|---|
| How many locations does your business have? | <Location count question ID> |
| What is your annual revenue? | <Annual revenue question ID> |
Replace the question ID placeholders with the configured QIDs when constructing the condition portion of the rule:
qid['<Location count question ID>'] > 3 &&
qid['<Annual revenue question ID>'] >= 100000000
Action Types#
Webhook#
Webhook action is one of the most versatile actions
Email#
Documentation for this action coming soon
Excel Rating Plan#
Documentation for this action coming soon
Carrier Direct API#
Documentation for this action coming soon