|
Note: You can use this component in a price plan, in a pricing macro, in a charging plan, or in a refill plan (refill logic). |
The Strings Comparator component compares
a string property with a string value or another string property. Four
comparison operators are available:
Is equal to
Starts with
Ends with
Contains
When you insert it in the decision tree, the Strings Comparator component creates two separate branches:
A branch that is activated when the comparison is true
A branch that is activated when the comparison is false
When the component is executed, only one branch is activated depending on the test result.
In a price plan, if you want to apply different prices to branches, you may need to compare a string property with a string value or another string property. To use the Strings Comparator inside your price plan, do the following:
After you add the component, choose the first property, the second property or the string value to be compared with the first one, and then the Comparator operator.
Describe the pricing of each decision tree branch by using a Function component.
A telephone operator decides to apply a special rate ($0.06 per minute) when the called number begins with "089"; otherwise, the call is billed at the usual price. The following table presents the information that the telephone operator needs to set up the Strings Comparator component inside the price plan:
|
Data |
Settings |
|
First property |
“Number called” |
|
Comparator operator |
“starts with” |
|
Value |
“089” |
|
Pricing rules |
Price that is applied to the “starts with” branch: $0.06 per minute. Price that is applied to the “does not start with” branch: Usual price. |
Name: Type the name of the component (mandatory).
Description: Allows you to type the description of the component (optional).
Property Name: Provides the list of string properties. Select the first string property.
Operator: Provides the list of comparison operators. Select one of the following operators:
is equal to
starts with
ends with
contains
Comparison Value: Provides the list of string properties or the String Value option. Select a second property or select String Value, and then type a string.