Customer Key (cst_key)
The cst_key is the primary key or identifier of a specific NetForum Customer.
NetForum is a Customer Relationship Management (CRM) software, and therefore the cst_key is the single most important database column in NetForum as it identifies the customers.
The cst_key column is an av_key User-defined data type based on the 36-character uniqueidentifer base type. It is the primary key of the co_customer table.
The cst_key is also known as Customer Key. In eWeb, {CustomerKey} is used as a parsed value that indicates the cst_key of the eWeb Login, which is an individual who has logged in.
An individual is a customer in NetForum. An organization and a chapter are also customers in NetForum, and these records have a customer key as well.
How to find the Customer Key for a record?
Many areas of NetForum refer to the Key of a record. You can often get this value by navigating to that record in iWeb and then looking at the URL querystring address. You should see in the querystring Key= followed by a 36-character string of numbers, letters and dashes. This is usually all the way to the right.
This is the sample URL of an individual:
https://www.SampleNetForumSite.com/iweb/forms/DynamicProfile.aspx?FormKey=b772881d-d704-40f3-92b6-09b13a50fcc9&Key=528acdd4-af85-45d9-9bcf-a1f46f5735c1
The value of the Key is:
528acdd4-af85-45d9-9bcf-a1f46f5735c1
A customer also has a Customer Number which is typically like this 0000076568I or perhaps only the integer portion 76568 depending on the implementation. This ID is stored in cst_id and is based on the integer identity column cst_recno. When communicating with customers, the Customer Number is used as a Member ID since it's obviously more user-friendly, but for any data processing or T-SQL, the customer key is the pivotal column.
Database
In NetForum, the following records have a customer key:
- Individual based on co_individual.ind_cst_key as a foreign key and primary key
- Organization based on co_organization.org_cst_key as a foreign key and primary key
- Chapter based on co_chapter.chp_cst_key as a foreign key and primary key
The Customer Key is also a Foreign Key column in many NetForum tables. For example, in co_individual_x_organization, this table has two columns that contain foreign keys that store cst_key values, the ixo_ind_cst_key and the ixo_org_cst_key.