CreateClients
The CreateClients attached business rule provides the capability to insert new client records from an activity as well as create relationships, class membership, addresses and activities related to the new client(s). This rule is specifically designed for the Data Intake Group Customer level transaction, but can be applied at any override level in the system.
CreateClients BR allows relationships to be created from a transaction to both new clients with an existing client/Group Customer and between two existing clients or edit a relationship by adding a new time slice or editing an existing Active time slice and enter a new time slice in its place |
Note: The <Client> element is used when creating ‘Client’ client types, and the <Organization> element is used for ‘ORG’ client types. Both types may coexist in the same instance of the rule.
Element/Tag | Attribute | Definition | Element/Attribute Value and Description |
---|---|---|---|
<CreateClients> |
|
|
|
<Client> |
|
Repeatable element: Required when creating Client records. |
|
TYPECODE |
Required attribute: Defines the Client type to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeClientType. |
|
INTAKERECORD |
Optional attribute: Defines the record in AsIntakeRecord with which the new client will be associated. Note: Only one client may be associated with an INTAKERECORDGUID. Once created, this association cannot be changed. |
MathVariable, Intake field or activity field containing an INTAKERECORDGUID, or an empty string. | |
<Tests> |
|
Optional element: Defines the section holding the tests that will determine if the Client record is to be created. |
|
<Test> |
|
Repeatable element: Standard expressions comparing fields or math variables. |
|
<Fields> |
|
Defines the section holding the Client fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<MultiFields> | Optional, repeatable element: Defines the multifields to be updated/inserted | ||
Note: The system will validate named "To" fields against the field name in the MultiField rule in the ClientScreen rule for the specified Client type code. |
|||
NAME | Required: Specifies the named section of the related entity's Multifield rule. | Literal name | |
END | Required: Specifies the total number of instances of multifields for the named section of the related entity's Multifield rule. If NAME is omitted or does not exist in the MultiField rule, all the fields in the MultiField rule will be repeated for "END" number of times. | Literal Integer or Integer Math Variable | |
<Field> | Optional, repeatable element: Contains the instructions for the specified "To" field. This element (and sub elements) may be omitted if the default field values are desired. | ||
<FromIndexCollection> | Required: A collection of index/value pairs for the target fields. Indices must be unique integers | Math variable collection of index/values. | |
<To> | Required: The target named field in the entity multifield rule | Literal field name | |
<Addresses> |
|
Defines the section holding the Addresses to create for the new client. |
|
<Address> |
|
Repeatable element: Defines the section holding the detail for a specific address. |
|
ROLECODE |
Required attribute: Defines the address role to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeAddressRole. |
|
COUNTRYCODE |
Required attribute: Defines the country context for the address role to be created. |
MathVariable or literal code value from AsCountry |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Address record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Defines the section holding the Address fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<MultiFields> | Optional, repeatable element: Defines the multifields to be updated/inserted | ||
Note: The system will validate named "To" fields against the field name in the MultiField rule in the AddressScreen rule for the address role code specified. |
|||
NAME | Required: Specifies the named section of the related entity's Multifield rule. | Literal name | |
END | Required: Specifies the total number of instances of multifields for the named section of the related entity's Multifield rule. If NAME is omitted or does not exist in the MultiField rule, all the fields in the MultiField rule will be repeated for "END" number of times. | Literal Integer or Integer Math Variable | |
<Field> | Optional, repeatable element: Contains the instructions for the specified "To" field. This element (and sub elements) may be omitted if the default field values are desired. | ||
<FromIndexCollection> | Required: A collection of index/value pairs for the target fields. Indices must be unique integers | Math variable collection of index/values. | |
<To> | Required: The target named field in the entity multifield rule. | Literal field name | |
<Relationships> |
|
|
|
<Relationship> |
|
Optional element: Defines the section holding the Relationship to create on the new client. |
|
PRIMARYGUID |
Optional attribute: Identifies the primary Client for the relationship time slice for relationship is to be created. |
MathVariable or field containing a ClientGUID. |
|
SECONDARYGUID |
Required attribute Identifies the secondary Client for the relationship time slice for relationship is to be created. Either of PRIMARYGUID or SECONDARYGUID is required |
MathVariable or field containing a ClientGUID. | |
PRIMARYTYPE |
Required attribute: Defines the primary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodePrimaryRelationshipType. |
|
SECONDARYTYPE |
Required attribute: Defines the secondary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodeSecondaryRelationshipType. |
|
EFFECTIVEFROM |
Required attribute: Defines the start date for the relationship with the Group Customer. |
MathVariable or field containing a date. |
|
RECORDSTATUSCODE |
Required attribute: Defines the record status code for the relationship time slice. |
MathVariable or field containing a status code. Code Name: AsCodeChangeStatus. Allowed Value are DRAFT/ACTIVE Default Value is "ACTIVE" |
|
BUSINESSSTATUSCODE |
Optional attribute: Defines the BUSINESSSTATUSCODE for relationship time slice |
MathVariable or field containing a status code. Code Name: AsCodeClientRelationshipBusinessStatus. |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Relationship record is to be created. |
Defines the section holding the tests to determine if the relationship record is to be created |
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Optional element: Defines the section holding the Client Relationship fields to populate. |
Defines the section holding the Client Relationship fields to populate |
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<ClassMemberships> |
|
Optional element: Defines the section holding the class memberships to create on the new client |
|
<ClassMembership> |
|
Optional, repeatable element: Defines the section holding the class membership attributes and tests. |
|
CLASSGUID |
Required attribute: Identifies the ClassGUID for the client. |
MathVariable or field containing a Group Customer GUID |
|
EFFECTIVEFROM |
Required attribute: Defines the start date for the class membership. |
MathVariable or field containing a date. |
|
EFFECTIVETO |
Optional attribute: Defines the end date of the class membership. |
MathVariable or field containing a date. |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the class membership is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Activities> |
|
Optional element: Defines the section holding the Activities to create on the new client. |
|
<Activity> |
|
Repeatable element: Defines the section holding the detail for a specific activity. |
|
TRANSACTIONNAME |
Required attribute: Defines the transaction to be created on the new client. |
MathVariable or literal transaction name from AsTransaction |
|
SEQUENCE |
Required attribute: Defines the sequence array the activity will be inserted into. |
ActivityArray MathVariable. |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Activity record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Required element: Defines the section holding the Activity fields to populate. |
|
<MultiFields> | Optional, repeatable element: Defines the multifields to be updated/inserted | ||
Note: The system will validate named "To" fields against the field name in the MultiField rule in the specified Transaction. |
|||
NAME | Required: Specifies the named section of the related entity's Multifield rule. | Literal name | |
END | Required: Specifies the total number of instances of multifields for the named section of the related entity's Multifield rule. If NAME is omitted or does not exist in the MultiField rule, all the fields in the MultiField rule will be repeated for "END" number of times. | Literal Integer or Integer Math Variable | |
<Field> | Optional, repeatable element: Contains the instructions for the specified "To" field. This element (and sub elements) may be omitted if the default field values are desired. | ||
<FromIndexCollection> | Required: A collection of index/value pairs for the target fields. Indices must be unique integers | Math variable collection of index/values. | |
<To> | Required: The target named field in the entity multifield rule | Literal field name | |
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
"EffectiveDate" is the minimum required input. |
<Organization> |
|
Required when creating Organization records. Repeatable. |
|
TYPECODE |
Required attribute: Defines the Organization type to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeOrganizationType. |
|
INTAKERECORD |
Optional attribute: Defines the record in AsIntakeRecord with which the new client will be associated. Note: Only one client may be associated with an INTAKERECORDGUID. Once created, this association cannot be changed. |
MathVariable, Intake field or activity field containing an INTAKERECORDGUID, or an empty string. | |
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Client record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Required element: Defines the section holding the Client and Organization fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<Relationship> |
|
Optional element: Defines the section holding the Relationship to create on the new client. |
|
PRIMARYGUID |
Required attribute: Identifies the Group Customer with whom the relationship is to be created. |
MathVariable or field containing a Group Customer GUID |
|
PRIMARYTYPE |
Required attribute: Defines the primary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodePrimaryRelationshipType. |
|
SECONDARYTYPE |
Required attribute: Defines the secondary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodeSecondaryRelationshipType. |
|
EFFECTIVEFROM |
Required attribute: Defines the start date for the relationship with the Group Customer. |
MathVariable or field containing a date. |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Relationship record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Optional element: Defines the section holding the Client Relationship fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<Addresses> |
|
Optional element: Defines the section holding the Addresses to create for the new client. |
|
<Address> |
|
Required, repeatable element: Defines the section holding the detail for a specific address. |
|
ROLECODE |
Required attribute: Defines the address role to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeAddressRole. |
|
COUNTRYCODE |
Required attribute: Defines the country context for the address role to be created. |
MathVariable or literal code value from AsCountry |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Address record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Defines the section holding the Address fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<Activities> |
|
Optional element: Defines the section holding the Activities to create on the new client. |
|
<Activity> |
|
Repeatable element: Defines the section holding the detail for a specific activity. |
|
TRANSACTIONNAME |
Required attribute: Defines the transaction to be created on the new client. |
MathVariable or literal transaction name from AsTransaction |
|
SEQUENCE |
Required attribute: Defines the sequence array the activity will be inserted into. |
ActivityArray MathVariable. |
|
<Tests> |
|
Optional element: Defines the section holding the tests to determine if the Activity record is to be created. |
|
<Test> |
|
Repeatable element: Standard expression comparing fields or math variables. |
|
<Fields> |
|
Defines the section holding the Activity fields to populate. |
|
<Field> |
|
Required, repeatable element: |
|
<From> |
|
Required element: Defines the source value, field or math variable. |
|
<To> |
|
Required element: Defines the target field name to which the source value is copied. |
|
<ReversalProcessing> |
Optional element: Defines the processing to be handled when the activity to which this BR is attached gets reversed |
||
<ShadowOnReversal> |
Optional element: Defines the conditions under which the Client record(s) created from this attached BR should be Shadowed |
||
<Tests> |
Optional element: Defines the section holding the tests to determine if the client record should be Shadowed on Reversal |
Standard <Tests> element configuration All Activity Fields and logged Activity Math variables can be used in Expressions under this Tests element |
|
<DeleteOnReversal> |
Optional element: Defines the conditions under which the Client record(s) created from this attached BR should be deleted |
||
<Tests> |
Optional element: Defines the section holding the tests to determine if the client record should be Deleted on Reversal. |
Standard <Tests> element configuration All Activity Fields and logged Activity Math variables can be used in Expressions under this Tests element |
XML Example
<CreateClients>
<Client TYPECODE="02">
<Tests>
<Test>CreateClient=True</Test>
</Tests>
<Fields>
<Field>
<From>ClientTaxID</From>
<To>TaxID</To>
</Field>
<Field>
<From>ClientLastName</From>
<To>LastName</To>
</Field>
<Field>
<From>ClientFirstName</From>
<To>FirstName</To>
</Field>
<Field>
<From>ClientMiddleInitial</From>
<To>MiddleInitial</To>
</Field>
<Field>
<From>ClientSex</From>
<To>Sex</To>
</Field>
<Field>
<From>ClientDOB</From>
<To>DateOfBirth</To>
</Field>
<Field>
<From>ClientEmail</From>
<To>Email</To>
</Field>
</Fields>
<Addresses>
<Address ROLECODE="02" COUNTRYCODE="AddressCountryCode">
<Tests>
<Test>CreateHomeAddress=True</Test>
</Tests>
<Fields>
<Field>
<From>AddressLine1</From>
<To>AddressLine1</To>
</Field>
<Field>
<From>AddressLine2</From>
<To>AddressLine2</To>
</Field>
<Field>
<From>AddressCity</From>
<To>City</To>
</Field>
<Field>
<From>AddressStateCode</From>
<To>StateCode</To>
</Field>
<Field>
<From>AddressCountryCode</From>
<To>CountryCode</To>
</Field>
<Field>
<From>AddressPostalId</From>
<To>PostalId</To>
</Field>
<Field>
<From>PhoneNumber</From>
<To>PhoneNumber</To>
</Field>
</Fields>
</Address>
</Addresses>
<Relationships>
<Relationship PRIMARYGUID="GroupCustomerClientGUID" PRIMARYTYPE="RelationshipPrimaryType" SECONDARYTYPE="RelationshipSecondaryType" EFFECTIVEFROM="RelationshipEffectiveDate">
<Tests>
<Test>1=1</Test>
</Tests>
<Fields>
<Field>
<From>RelationshipSecondaryType</From>
<To>BusinessUnit</To>
</Field>
<Field>
<From>AddressCountry</From>
<To>CBSPayLocation</To>
</Field>
<Field>
<From>EmploymentStatus</From>
<To>CustomerEmploymentStatusCode</To>
</Field>
<Field>
<From>RelationshipSecondaryType</From>
<To>EmployeeCategory</To>
</Field>
<Field>
<From>ClientTaxID</From>
<To>EmployeeIdentifier</To>
</Field>
<Field>
<From>EmploymentStatus</From>
<To>JobStatus</To>
</Field>
<Field>
<From>EmployeeSalary</From>
<To>EmployeeSalary</To>
</Field>
<Field>
<From>Activity:EffectiveDate</From>
<To>SalaryEffectiveDate</To>
</Field>
<Field>
<From>EmployeeSalary</From>
<To>PastSalary</To>
</Field>
<Field>
<From>Activity:EffectiveDate</From>
<To>EmploymentDate</To>
</Field>
<Field>
<From>Activity:EffectiveDate</From>
<To>OriginalHireDate</To>
</Field>
</Fields>
</Relationship>
</Relationships>
<ClassMemberships>
<ClassMembership CLASSGUID="Class1ClassGUID" EFFECTIVEFROM="Class1EffectiveFrom" EFFECTIVETO="Class1EffectiveTo">
<Tests>
<Test>Not IsEmpty(Class1ClassGUID)</Test>
</Tests>
</ClassMembership>
</ClassMemberships>
<Activities>
<Activity TRANSACTIONNAME="DentalEnrollmentPrototype" SEQUENCE="ClientActivityArray">
<Tests>
<Test>1=1</Test>
</DeleteOnReversal>
</ReversalProcessing>
</Tests>
<Fields>
<Field>
<From>Activity:EffectiveDate</From>
<To>EffectiveDate</To>
</Field>
<Field>
<From>NewPolicyNumber</From>
<To>NewPolicyNumber</To>
</Field>
<Field>
<From>NewPolicyName</From>
<To>NewPolicyName</To>
</Field>
<Field>
<From>AddressStateCode</From>
<To>StateCode</To>
</Field>
</Fields>
</Activity>
</Activities>
</Client>
<Organization TYPECODE="01">
<Tests>
<Test>AddTestOrganization=1</Test>
</Tests>
<Fields>
<Field>
<From></From>
<To></To>
</Field>
</Fields>
<Relationship PRIMARYGUID="GroupCustGUID" PRIMARYTYPE="" SECONDARYTYPE="" EFFECTIVEFROM="Date">
<Tests>
<Test>AddTestOrganizationRelation=1</Test>
</Tests>
<Fields>
<Field>
<From>RelationDateFrom</From>
<To>EffectiveFrom</To>
</Field>
</Fields>
</Relationship>
<Addresses/>
<Activities/>
</Organization>
<ReversalProcessing>
<ShadowOnReversal>
<Tests>
<Test>Expression</Test>
</Test>
</ShadowOnReversal>
<DeleteOnReversal>
<Tests>
<Test>Expression</Test>
</Test>
</DeleteOnReversal>
</ReversalProcessing>
</CreateClients>