Customer Groups and Addresses

Customer Groups

A new mechanism for configuring customer groups has been implemented. Customer groups can be configured in two distinct ways.

  1. Using a separate custom table to store customer groups
  2. Using the CUSTOMER table and linking existing customers to a parent CUSTOMER group record

Both ways have advantages and disadvantages and it will depend on the individual Impact user’s requirements which method should be used.

Configure using Separate CUSTGRP Custom Table

To configure customer groups using a separate table

  • Create a CUSTGRP table, containing CG_KEY (integer) and CG_NAME (string)
  • Create  a DBW for CUSTGRP
  • Create one or more CUSTGRP records
  • Add a CUSTOMER.CS_CUSTGRP integer column
  • Configure the relationship CUSTOMER.CS_CUSTGRP --> CUSTGRP.CG_KEY
  • Configure the customer group in Database Installation->Table Relationships->Advanced

  • Configure the CUSTOMER DBW with a dynamic lookup using the relationship so individual CUSTOMER records can be assigned a customer group.

Configure using CUSTOMER table

To configure customer groups using the CUSTOMER table

  • Add a CUSTOMER.CS_CUSTGRP integer column
  • Add a CUSTOMER.CS_ISGRP Boolean column (although any column type can be used here, for example a string column containing a ‘G’ for group)

  • Configure the CUSTOMER DBW to add the CS_ISGRP Boolean, so individual CUSTOMER records can be marked as being customer groups.
  • Configure the CUSTOMER DBW with a dynamic lookup using the relationship so individual CUSTOMER records can be assigned a customer group. You will need to include ‘CS_ISGRP = 1’, for example, in the Filter SQL. The dynamic lookup reads data from the same table as the DBW and it has filter SQL assigned. So each time a records changes the dynamic lookup is automatically rebuilt. This means as you are updating CUSTOMER.CS_ISGRP valuers the dynamic lookup will automatically display all available records.

  • In the CUSTOMER DBW you can now create a customer group by setting the Is Customer Group flag.

  • For a customer you can assign the appropriate customer group.

  • Configure the CUSTOMER DBW automation ‘InsertValidate’ and ‘ChangeValidate’ to prevent both CS_ISGRP and CS_CUSTGRP from being set in the same record.

When using the CUSTOMER table to also store customer groups additional restrictions apply.

  • Impact will exclude all CUSTOMER records marked as a group from the customer list, so no projects can be directly assigned to a customer group.
  • If you configure a default customer for new items and it is a customer group, Impact will assign that customer but display ‘<Missing Customer nnn>’. It is up to the administrator to ensure that a CUSTOMER record that is not a group is configured.
  • Existing drawings that were previously associated to a customer group will also show ‘<Missing Customer nnn>’.

Using Customer Groups

Once either method is configured you can edit the CUSTOMER records and assign a customer group to individual customers. These are currently used within the new customer selector, but not yet used within the Impact Browser.

When customer groups are configured the customer selector will show them and include all customers from each group. Filtering within the customer selector will always show all customers from a group if the group itself matches the filter.

ADDRESS Examples

The built in ADDRESS table has 4 predefined relationships that link an address to an owner. This can be either a CUSTOMER, CONTACTS, SITES or USERS record.

The address belongs to that owner and it's from the owner that you perform editing of the address.

Linking CUSTOMER to Customer Group ADDRESSes

From COM you could get the CS_CUSTGRP value from an ICustomer, access the customer group ICustomer and grab the IAddresses. You could then load a ‘Billing’ address for example.

Alternatively you could define an actual link between a CUSTOMER record and a customer group ADDRESS using a dynamic lookup.

Linking USERS to CUSTOMER Addresses

To link USERS to CUSTOMER addresses, the first thing that is required is a way to link each user to a specific customer. In WEBcnx it is assumed you already have a USERS.U_CUSTKEY or similar column linking each USERS record to a CUSTOMER.

Creating the Links

To link an object to an ADDRESS owned by another object you can do this in two ways; using either a Many-to-one or Many-to-many relationship.

The following examples explain how to link USERS to ADDRESSes but the examples are equally applicable if you want to link CUSTOMERs to ADDRESSes, or in fact any table to any other table.

Many-to-One using a Dynamic Lookup

This type of link is used when you want a single address configured. Such as a User's Primary address, User's Delivery Address, Customer's Billing Address or similar.

  • Add a link column to the object. E.g. USERS.U_PRIMADDR.
  • Define the table relationship. E.g. USERS.U_PRIMADDR -> ADDRESS.A_KEY.
  • Add the dynamic lookup control to the USERS DBW. Using the table relationship makes this easy. Note the child/parent filtering to only show the ADDRESS records for the appropriate user’s customer.

Many-to-many using a Link Table

This type of link is appropriate when you want to link each user to multiple ADDRESS objects owned by another object, such as linking a USER to multiple CUSTOMER addresses.

  • Create a USERADDR link table containing UA_KEY, UA_USERKEY, UA_ADDRKEY.
  • Define the two table relationships; USERADDR.UA_USERKEY -> USERS.U_KEY and USERADDR.UA_ADDRKEY -> ADDRESS.A_KEY.

  • Add a Check List type control to the USERS DBW. Again, note the child/parent filtering to only show the ADDRESS records for the appropriate user’s customer.

USER’s DBW

Here are the three controls used to link addresses to USERS.

  1. Dynamic Lookup (Many-to-one)
  2. Check ListView (Many-to-many)
  3. Child Table ListView (One-to-many)

Deleting Addresses

When the owner is deleted all their addresses are also deleted.

When an individual address is deleted from its owner object, any links to that address in other objects will become invalid.

However, by configuring a table relationship Impact knows about these links and should automatically clear the values stored in these link columns when the address is removed.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

You may like to read -