AutomaticCustomerNumber BR
This business rule generates the CustomerNumber when a new Group Customer is stored It works in a similar way to the AutomaticPolicyNumber BR utilizing the <Part> tag to define the customer number.
On saving the group customer data, a group customer number will be generated i.e.this rule is invoked when <AutomaticCustomerNumber> tag is set to "Yes" and it is Optional in the GroupCustomerScreen business rule; if AutomaticCustomerNumber BR is not configured, the system will throw "Missing AutomaticCustomerNumber BR" error.
Element/Tag | Attribute | Definition | Element/Attribute Value and Description |
---|---|---|---|
<AutomaticCustomerNumber> | The opening and closing tag for the rule. |
|
|
<Part> | Indicates the value of the field parts to define and format the specified field, value, or sequence. | ||
Value or FieldName or SequenceName: Defines the field or value to be used in generating the customer number. | |||
TYPE |
VALUE - Defines a set values and what the value will be for the CNumber. The tag must contain a value. SYSTEMDATE- Indicates that a portion of the current date will be used in the creation of the CustomerNumber. Used in conjunction with the FORMAT attribute. FIELD- Indicates that a value from a field will be included in the CustomerNumber. The Part element specifies the field being used. Note: Only Dynamic fields can be used with this element. LEFT, RIGHT, and MID: These attributes may be used to select parts of the field. SEQUENCE- Indicates the value is in AsSequence table. The value of the table is inserted according to the number of digits specified in the FORMAT attribute. The value of the Part tag is the SequenceName. |
||
FORMAT |
Indicates the formatting to be performed on the type attributes. For TYPE="SYSTEMDATE": YY - Indicates that the last two digits of the current year should be used. MM - Indicates that the current month number should be used. DD - Indicates that the current day number should be used . For TYPE=SEQUENCE: '0xxxxx'- Indicates the number of digits to be generated in the sequence number where x represents '0'. For example if FORMAT is `000000' and generated sequence number is 1111, then after formatting it will become `001111' |
||
LEFT | LEFT=n: Selects the leftmost 'n' digits of the field value for the part. | ||
RIGHT | RIGHT=n: Selects the rightmost 'n' digits of the field value for the part. | ||
MID | Mid=m,n: Selects the middle characters of the field value, from position 'm' to position 'n'. This is a comma-separated string of two numbers specifying the starting and ending index of the characters to be selected for the part. |
XML Schema
<AutomaticCustomerNumber>
<Part TYPE="[VALUE|SYSTEMDATE|FIELD|SEQUENCE]" FORMAT="[YY|0xxxxx]" LEFT="[Integer]"
MID="[Integer,Integer]"RIGHT="[Integer]"
SEQUENCEDATE="[SYSTEMDATE|FieldName|VariableName]">[Value|FieldName|SequenceName]</Part>
</AutomaticCustomerNumber>
XML Example
<AutomaticCustomerNumber>
<Part TYPE="VALUE">AVA </Part>
<Part TYPE="SYSTEMDATE" FORMAT="YY"/>
<Part TYPE="FIELD"> StuatoryCompany</Part>
<Part TYPE="SEQUENCE" FORMAT ="000000">CustomerNumber</Part>
</AutomaticCustomerNumber>