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). It also allow inserting single or multiple phone records for a client in the client or address. 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.
Note: The <PhoneRecords> section in the <Client> and <Address> of the CreateClients BR, will record the phone record in the client and address respectively.
Element/Tag | Attribute | Definition | Element/Attribute Value and Description |
---|---|---|---|
<CreateClients> |
|
|
|
<Client> |
<CreateClients> |
Repeatable element: Required when creating Client records. |
|
<Client> |
Required attribute: Defines the Client type to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeClientType. |
|
<Client> |
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> | <Client> |
Optional element: Defines the section holding the tests that will determine if the Client record is to be created. |
|
<Test> |
<Tests> |
Repeatable element: Standard expressions comparing fields or math variables. |
|
<Fields> |
<Client> |
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. |
||
|
|
Required: Specifies the named section of the related entity's Multifield rule. | Literal name |
|
|
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. |
|
<FromCollection> |
|
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> |
<Client> |
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. |
|
|
Required attribute: Defines the address role to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeAddressRole. |
|
|
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. |
||
|
|
Required: Specifies the named section of the related entity's Multifield rule. | Literal name |
|
|
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 |
<PhoneRecords> | <Address> |
Optional Element: Opening tag for phone records. |
|
<Fields> | <PhoneRecords> |
Opening tag for phone fields. |
|
<Field> | <Fields> |
Required Element: Opening tag for field details |
|
<FromCollection> | <Field> |
Optional. Repeatable Element: A collection of key/value pairs for the target fields. Indices must be (unique) phone numbers Can be used to capture a single detail of a phone record. |
<From> and <FromCollecion> should not be used together |
<To> | <Field> |
Required Element: The target named field in phone screen |
|
<Phone> | <PhoneRecords> |
Optional and repeatable element: Opening tag to capture single phone details |
|
|
|
|
|
<From> | <Phone> |
Optional. repeatable element: Can be used to capture a single detail of a phone record. |
Math variable collection of index/values. <From> and <FromCollecion> should not be used together |
<To> | <Field> |
Required Element: The target named field in phone screen |
|
<Relationships> |
<Client> | ||
<Relationship> |
|
Optional element: Defines the section holding the Relationship to create on the new client. |
|
|
Optional attribute: Identifies the primary Client for the relationship time slice for relationship is to be created. |
MathVariable or field containing a ClientGUID. |
|
|
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. | |
|
Required attribute: Defines the primary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodePrimaryRelationshipType. |
|
|
Required attribute: Defines the secondary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodeSecondaryRelationshipType. |
|
|
Required attribute: Defines the start date for the relationship with the Group Customer. |
MathVariable or field containing a date. |
|
|
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" |
|
|
|
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> |
<Client> |
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. |
|
|
Required attribute: Identifies the ClassGUID for the client. |
MathVariable or field containing a Group Customer GUID |
|
|
Required attribute: Defines the start date for the class membership. |
MathVariable or field containing a date. |
|
|
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> |
<Client> |
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. |
|
|
Required attribute: Defines the transaction to be created on the new client. |
MathVariable or literal transaction name from AsTransaction |
|
|
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. |
||
|
|
Required: Specifies the named section of the related entity's Multifield rule. | Literal name |
|
|
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. |
<PhoneRecords> | <Client> |
Optional element: Opening tag for phone records |
|
<Tests> | <PhoneRecords> |
Optional Element: Opening tag to define test conditions |
|
<Test> | <Tests> | Tag to contain test conditions |
|
<Fields> | <PhoneRecords> |
Opening tag for phone details |
|
<Field> | <Fields> |
Required Element: Opening tag for field details |
|
<FromCollection> | <Field> |
Required. repeatable element: A collection of key/value pairs for the target fields. Indices must be (unique) phone numbers |
|
<To> | <Field> |
Required Element: The target named field in AsPhoneField |
|
<Phone> | <phonerecords> |
Optional and repeatable element: Opening tag to capture single phone records |
|
<Tests> | <Phone> |
Optional element: Opening element to define test conditions. |
|
<Test> | <Tests> | Tag to define test condition. |
|
<Fields> | <Phone> | Opening tag |
|
<Field> | <Fields> | Opening tag to capture the field details. |
|
<From> | <Field> |
Optional and repeatable element: Can be used to capture single detail of a phone record. |
Math variable collection of index/values. |
<To> | <Field> |
Required Element: The target named field in AsPhoneField. |
|
<Organization> |
|
Required when creating Organization records. Repeatable. |
|
|
Required attribute: Defines the Organization type to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeOrganizationType. |
|
|
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. |
|
|
Required attribute: Identifies the Group Customer with whom the relationship is to be created. |
MathVariable or field containing a Group Customer GUID |
|
|
Required attribute: Defines the primary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodePrimaryRelationshipType. |
|
|
Required attribute: Defines the secondary relationship type with the Group Customer. |
MathVariable or literal code value from AsCode.CodeName: AsCodeSecondaryRelationshipType. |
|
|
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. |
|
|
Required attribute: Defines the address role to be created. |
MathVariable or literal code value from AsCode.CodeName: AsCodeAddressRole. |
|
|
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. |
|
<PhoneRecords> | <Address> |
Optional element: Opening tag for Address phone records |
|
<Tests> | <PhoneRecords> |
Optional element: Opening tag for test |
|
<Test> | <Tests> | Tag to define test conditions |
|
<Fields> | <PhoneRecords> | Parent tag for Field |
|
<Field> | <Fields> |
Required and repeatable element: Opening tag to contain phone details |
|
<FromCollection> | <Field> |
Required. repeatable element: A collection of key/value pairs for the target fields. Indices must be (unique) phone numbers |
|
<To> | <Field> |
Required element: Tag used to map a field to AsPhone detail |
|
<Phone> | <PhoneRecords> |
Optional and repeatable element: Parent tag to capture single phone details |
|
<Tests> | <Phone> |
Optional element: Parent tag to define tests |
|
<Test> | <Tests> | Tag to define test condition |
|
<Fields> | <Phone> | Parent tag for fields |
|
<Field> | <Fields> |
Required and repeatable element: Parent tag to capture phone details |
|
<From> | <Field> |
Requires and Repeatable element: Element to capture single phone details |
|
<To> | <Field> |
Required element: Tag used to map a field to AsPhone detail |
|
<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. |
|
|
Required attribute: Defines the transaction to be created on the new client. |
MathVariable or literal transaction name from AsTransaction |
|
|
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 Schema
<CreateClients> <Client> <PhoneRecords> <Tests> <Test></Test> </Tests> <Fields> <Field> <FromCollection></FromCollection> <To></To> </Field> </Fields> <Phone> <Tests> <Test></Test> </Tests> <Fields> <Field> <From></From> <To></To> </Field> </Fields> </Phone> </PhoneRecords> <Addresses> <Address> <Fields> <Field> </Field> </Fields> <PhoneRecords> <Tests> <Test> </Test> </Tests> <Fields> <Field> <FromCollection></FromCollection> <To></To> </Field> <Fields> <Phone> <Fields> <Field> <From></From> <To></To> </Field> </Fields> </Phone> </PhoneRecords> </Address> </Addresses> </Client> <CreateClients>
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>
<CreateClients> <Client> <PhoneRecords> <Tests> <Test></Test> </Tests> <Fields> <Field> <FromCollection></FromCollection> <To></To> </Field> </Fields> <Phone> <Tests> <Test></Test> </Tests> <Fields> <Field> <From></From> <To></To> </Field> </Fields> </Phone> </PhoneRecords> <Addresses> <Address> <Fields> <Field> </Field> </Fields> <PhoneRecords> <Tests> <Test> </Test> </Tests> <Fields> <Field> <FromCollection></FromCollection> <To></To> </Field> <Fields> <Phone> <Fields> <Field> <From></From> <To></To> </Field> </Fields> </Phone> </PhoneRecords> </Address> </Addresses> </Client> <CreateClients>