A Policy is a collection of rules and executes the rules in the order that they are configured.
By default, a policy stops executing subsequent rules when the first rule (in the policy) evaluates to True. This behavior can be overridden when required. A policy can also contain one or more policies that will be executed, in the order that they are defined, in the Conversation Platform Console UI.
The following table details the attributes exposed by a Policy:
| Name | Policy name |
|---|---|
| Type | 1 of ["VA", "Routing"...] |
| Version | v1,v2...vn |
| Status | 1 of ["Draft", "Published"] |
| Rules | Rules [R1,R2,...Rn] |
| Policies | Policy [P1,P2,...Pn] |
| Priority | Priority order of execution |
Rules in the policy are executed in the order they are defined. A policy always returns a binary outcome, True or False. It returns True if any rule in the policy is True and False otherwise. By default, when a rRule in a policy evaluates to True, it stops executing subsequent rules and returns True.
Each partner can author their own policy to represent the desired business logic for the Rules encapsulated in the Policy. With this approach, every platform partner can quickly modify the behavior of their Virtual Agent to satisfy specific business requirements. In order to achieve this, the partner can start with a library of System or predefined business rule templates that are provided out of the box. If no suitable rule template is available, the Conversation Platform provides a way for the partner to author their own Rule Template through the Conversation Platform Console.
Now let's take a quick look at an example of a policy that evaluates multiple rules.
Let's take an example wherein a Virtual Agent would waive fees if the customer is loyal. Assume the following Rule Template and Rules have been defined:
Rule Template:
Rules:
A policy can now be created where a prioritized execution of the above Rules is defined. P1, P2 and P3 represent the priority of the respective rules, forming the basis for execution sequence for these rules.
Policy:
Assuming the Customer is of Silver loyalty status, it falls through to the second rule, resulting in application of a waiver of 50%.
Additional policy information can be found at: