31st July 2007
Amended 5th May 2023
The most frequent business information need is to ask questions about people and organisations, and to be able to rely on accurate answers to these questions. For instance:
Most data models maintain organisational information in various entities that are portrayed as completely separate entities. For instance, there may be a customer entity, supplier entity and department entity. Each application within an enterprise has its own needs, therefore the data modeler will usually base the model on the needs of a particular application. For example, a sales order processing system deals with customers, a purchase order processing system deals with suppliers, and a human resources system deals with departments within which the employees work.
The problem is that an organisation may play several different roles depending on the particular circumstances. For instance, in larger companies, internal organisations may sell to each other. The property management division may be a supplier to the product sales division. The property management division may also be customer of the product sales division. In this case there would normally be both a customer and supplier record, with redundant data, for each of these divisions. Not only would there be a customer and supplier record, but there could also be many additional records for the organisation depending on how many roles the organisation plays within the enterprise.
When an organisation's information changes - such as a change in address - the information might be updated in only one of the many systems where organisation information is stored. This, of course, results in inconsistent information within the enterprise. It may also result in major frustration on the part of managers, customers, suppliers, and anyone else who may want to generate a correct mailing list.
The solution to this redundancy problem is to have a single entity which can store information about any type of organisation, with details of their various roles and relationships maintained on separate entities.
Just as most data models show separate entities for for various types of organisation, they also show separate entities for various types of people such as employees, contractors, supplier contacts, and customer contacts. The problem with keeping this information in separate entities is that people may also have different jobs and roles that change over time. Most systems will record redundant information about a person because they store a different record each time the person's role changes. It is also possible for a person to have several different roles at the same time.
The solution to this redundancy problem is to have a single entity which can store information about any type of person, with details of their various roles and relationships maintained on separate entities.
It then becomes obvious that there are several similarities in how the data is held for organisations and people which result in duplicate data structures. When you couple this with the fact that in some circumstances it is necessary to link to an entity which could be either an organisation or a person, great savings could be made by using a single structure for both. It is for this reason that this data model has a PARTY entity which holds common data for both organisations and people, with specific data for each held on separate tables. All classifications, roles and relationships can therefore be maintained in a single data structure which links back to PARTY instead of having one structure for organisations and another for people.
A PARTY can be either an ORGANISATION or a PERSON. The PARTY table holds the unique identity and name of every organisation or person, while specific information is held on either the ORGANISATION table or PERSON table depending on the party type. Other parts of the system which hold a reference to either an organisation or a person always link back to the PARTY table.
Figure 1 - Party, Organisation and Person
Table 1 - Relationships with other database tables
This holds the identity, name and type of every party within the system. It will have a corresponding entry on either the ORGANISATION or PERSON table depending on the party type.
The value for party_id will be generated internally by the system, but there may be a requirement to provide a alternative id as used by an external system. This facility is provided on the PARTY_IDENTIFICATION table.
Field | Type | Description |
---|---|---|
party_id | number | Identity number which is generated by the system. |
party_name | string | Free format text. |
party_type | string | Either ORGANISATION or PARTY. |
party_status_id | string | Optional. Links to an entry on the PARTY_STATUS table. |
is_stopped | boolean | A YES/NO switch with an initial value of NO. It indicates if the processing of sales orders from this party has been stopped. |
is_credit_checked | boolean | A YES/NO switch with an initial value of NO. It indicates if this party has passed the credit check procedure or not. If the value is NO then sales orders from this party can be taken, but cannot be authorised. |
currency_code | string | Links to an entry on the CURRENCY_CODE table. Identifies the currency in which this party operates. |
language_id | string | Optional. Identifies the party's language when it is different from the application's default language. |
calendar_id | numeric | Optional. Links to an entry on the CALENDAR_HEADER table. |
start_date | date | The start date for this party. |
end_date | date | The end date for this party. Blank signifies an unspecified date in the future. |
Here are some examples:
Party Id | Name | Type |
---|---|---|
1 | ABC Corporation | organisation |
2 | ABC Subsidiary | organisation |
3 | John Smith | person |
4 | ACME Corporation | organisation |
5 | Fantastic Supplies | organisation |
6 | Fred Bloggs | person |
This entity holds the basic details of those parties which are organisations rather than people.
Field | Type | Description |
---|---|---|
party_id | number | Identity. Links to the PARTY table. |
org_type_id | string | Links to the ORGANISATION_SUBTYPE table. |
org_subtype_id | string | Links to the ORGANISATION_SUBTYPE table. |
corp_reg_no | string | Optional. Company/Corporation Registration Number. |
tax_no | string | Optional. Tax/VAT number. |
org_notes | string | Optional. Free format notes |
currency_code_local | string | Optional. Links to an entry on the UNIT_OF_MEASURE table. Only required if the organisation's currency is different from that of the country in which it is located, and financial reports need to be produced in the local currency. |
This entity holds the basic details of those parties which are people rather than organisations.
Field | Type | Description |
---|---|---|
party_id | number | Identity. Links to the PARTY table. |
last_name | string | Last name. |
first_name | string | First name. |
middle_name | string | Optional. Middle name. |
personal_title | string | Optional. Personal Title (Mr, Mrs, etc) |
nickname | string | Optional. Nickname |
gender | string | Optional. Either MALE or FEMALE |
dob | date | Optional. Date of Birth |
marital_status | string | Optional. Can be one of the following:
|
nat_ins_no | string | Optional. National Insurance or Social Security Number. |
person_notes | string | Optional. Free format text. |
is_assessed_employee | boolean | Identifies is this employee is to be the subject of Peformance Assessments. |
This holds all contact notes for each party. A note may also be associated with other objects, such as orders, invoices or non-conformance reports.
Field | Type | Description |
---|---|---|
note_id | number | Identity number which is generated by the system. |
note_text | string | Free format text. |
note_source | string | Either TELEPHONE or blank |
party_id | number | Links to an entry on the PARTY table. |
order_type | string | Optional. Links to an entry on the ORDER_HEADER table. |
order_id | number | Optional. Links to an entry on the ORDER_HEADER table. |
invoice_type | string | Optional. Links to an entry on the INVOICE_HEADER table. |
invoice_id | number | Optional. Links to an entry on the INVOICE_HEADER table. |
ncr_id | number | Optional. Links to an entry on the NON_CONFORMANCE_REPORT table. |
case_id | numeric | Links to an entry on the EMAIL_CASE table. |
Organisations can be categorised by TYPES and SUBTYPES. An organisation can have only one type/subtype.
Figure 2 - Organisation Types and Subtypes
Organisations fall into broadly into one of two categories or types - formal (legal) and informal. Each of these types can be broken down further into subtypes which are held on the ORGANISATION_SUBTYPE table.
Field | Type | Description |
---|---|---|
org_type_id | string | Identity |
org_type_desc | string | Description |
Here are some examples:
This is an extension of the ORGANISATION_TYPE table which allows entries on the ORGANISATION table to be classified.
Field | Type | Description |
---|---|---|
org_type_id | string | Links to the ORGANISATION_TYPE table. |
org_subtype_id | string | Identity |
org_subtype_desc | string | Description |
Here are some examples:
Type | Subtype |
---|---|
Formal | Corporation |
Government Agency | |
Informal | Family |
Team |
Parties, both organisations and people, can be classified in many different ways. There is the broad PARTY_CLASS and the narrower PARTY_SUBCLASS. Each party can be linked with any number of classes/subclasses by using the PARTY_SUBCLASS_LINK table, and each link has its own start and end date to maintain a history of changes over time..
Figure 3 - Party Classes and Subclasses
These are a series of broad classifications which can be applied to parties. Each class is broken down into its own group of subclasses.
Field | Type | Description |
---|---|---|
party_class_id | string | Identity |
party_class_desc | string | Description |
party_type | string | Either ORGANISATION or PERSON |
Here are some examples:
This breaks down each PARTY_CLASS into a series of narrower subclasses.
Field | Type | Description |
---|---|---|
party_class_id | string | Identity. Links to the PARTY_CLASS table. |
party_subclass_id | string | Identity |
party_subclass_desc | string | Description |
Here are some examples:
Type | Subtype |
---|---|
Industry Classification | Manufacturing |
Telecommunications | |
Government Institute | |
Size Classification | Small |
Medium | |
Large | |
National Account | |
Income Classification | Below £20,000 |
£20,001 to £50,000 | |
£50,000 to £250,000 | |
Over £250,000 | |
Minority Classification | Female Owned Business |
Minority Owned Business | |
Employment Equal Opportunities Commission | African American |
Asian or Pacific Islander | |
Hispanic | |
Native American | |
White non-Hispanic | |
Tax Classification | Bonded (see FAQ 3) |
Exempt |
Any PARTY can be categorised in any number of ways by linking it to entries on the PARTY_SUBCLASS table. Each entry is only valid for a particular time period, so it is possible to have different values for different dates.
Note that it is not possible to have more than entry with the same party_class_id active with the same party_id on the same date.
Field | Type | Description |
---|---|---|
party_id | number | Links to the PARTY table. |
party_class_id | string | Links to the PARTY_SUBCLASS table. |
party_subclass_id | string | Links to the PARTY_SUBCLASS table. |
start_date | date | The start date for this entry. |
end_date | date | The end date for this entry. Blank signifies an unspecified date in the future. |
Here are some examples:
Party | Type | Subtype | Start | End |
---|---|---|---|---|
ABC Corporation | Industrial | Manufacturing | 1 jan 2000 | |
Size | Medium | 1 Jan 2000 | 4 Apr 2007 | |
Size | Large | 5 Apr 2007 | ||
XYZ Corporation | Industrial | Telecommunications | 1 jan 2000 | |
Size | Large | 1 Jan 2000 |
Parties, both organisations and people, can have any number of roles, There is the broad ROLE_TYPE and the narrower ROLE_SUBTYPE. Each party can be linked with any number of role-types/role-subtypes by using the PARTY_ROLE_LINK table, and each link has its own start and end date to maintain a history of changes over time.
Figure 4 - Party Roles
This identifies the roles that a party may play in the context of the enterprise's environment, as defined in the PARTY_ROLE_LINK table. Each type is further divided into a series of SUBTYPES. Some types may be relevant to organisations only, or people only, while others may be relevant to both.
Field | Type | Description |
---|---|---|
role_type_id | string | Identity |
role_type_desc | string | Description |
party_type | string | This identifies if the entry applies to Organisations, People, or both. |
Here are some examples:
This breaks down each ROLE_TYPE into a series of subtypes.
Field | Type | Description |
---|---|---|
role_type_id | string | Identity. Links to the ROLE_TYPE table. |
role_subtype_id | string | Identity |
role_subtype_desc | string | Description |
Here are some examples:
Type | Subtype |
---|---|
Customer Role | Bill To Customer |
Ship To Customer | |
End user Customer | |
Supplier Role | Major Supplier |
Minor Supplier | |
Organisation Role | Agent |
Association | |
Competitor | |
Customer | |
Department | |
Distributor | |
Division | |
Freight Carrier | |
Functional Unit | |
Internal Organisation | |
Parent Organisation | |
Partner | |
Regulatory Agency | |
Subsidiary Organisation | |
Supplier | |
Team | |
Prospect | Hot Prospect |
Warm Prospect | |
Cold Prospect | |
Prospect | |
Shareholder | Major Shareholder |
Minor Shareholder | |
Shareholder | |
Person Role | Account Manager |
Apprentice | |
Contact | |
Contractor | |
Customer Contact | |
Customer Service Representative | |
Employee | |
Notary | |
Parent | |
Project Manager | |
QA Representative | |
Supplier Coordinator | |
Supplier Service Contact | |
Team Leader | |
Family Role | Brother |
Child | |
Father | |
Husband | |
Family Member | |
Mother | |
Parent | |
Sibling | |
Sister | |
Spouse | |
Wife |
The roles which a PARTY may have are identified by linking it to entries on the ROLE_SUBTYPE table. Each entry is only valid for a particular time period, so it is possible to have different values for different dates.
Field | Type | Description |
---|---|---|
party_id | number | Links to the PARTY table. |
role_type_id | string | Links to the ROLE_SUBTYPE table. |
role_subtype_id | string | Links to the ROLE_SUBTYPE table. |
start_date | date | The start date for this entry |
end_date | date | The end date for this entry. Blank signifies an unspecified date in the future. |
Here are some examples:
Party | Role |
---|---|
ABC Corporation | Internal organisation |
Parent organisation | |
ABC Subsidiary | Internal organisation |
Subsidiary organisation | |
Accounting Division | Internal organisation |
Division | |
Fantastic Supplies | Supplier |
ACME Corporation | Customer |
Supplier | |
Hughes Cargo | Supplier |
Freight Carrier | |
Shirley Jones | Employee |
Project manager | |
QA representative | |
Barry Cunningham | Contractor |
Joe Schmoe | Customer contact |
Jerry Red | Employee |
Customer service representative |
Any relationship between two parties can be stored on the PARTY_RELATIONSHIP table. Each party in the relationship has a different role, and there can be several different relationships between the same two parties. Each relationship has its own start and end date so that a history of changes over time can be maintained.
Figure 5 - Party Relationships
This holds all the possible types for use on the PARTY_RELATIONSHIP table.
Field | Type | Description |
---|---|---|
rel_type_id | string | Identity |
rel_type_desc | string | Description |
Here are some examples:
This holds all the possible priorities for use on the PARTY_RELATIONSHIP table.
Field | Type | Description |
---|---|---|
rel_priority_id | string | Identity |
rel_priority_desc | string | Description |
sort_seq | number | Sort Sequence. Used to provide a numeric value on which the records can be sorted. |
Here are some examples:
ID | Description | Seq |
---|---|---|
HIGH | High Priority | 1 |
MED | Medium Priority | 2 |
LOW | Low Priority | 3 |
This holds all the possible status values for use on the PARTY_RELATIONSHIP table.
Field | Type | Description |
---|---|---|
rel_status_id | string | Identity |
rel_status_desc | string | Description |
Here are some examples:
This is used to record any relationship which may exist between two parties, and each party's role in the relationship. There may be more than one relationship between two parties, and each entry is only valid for a particular time period, so it is possible to have different values for different dates.
It does not matter in which order the two parties are specified, which means that when searching for relationships with a particular party the system will search both PARTY_1 and PARTY_2 and show the details of the other party.
Field | Type | Description |
---|---|---|
party_id_1 | number | Identifies the first party in the relationship. Links to the PARTY table. |
party_id_2 | number | Identifies the second party in the relationship. Links to the PARTY table. |
seq_no | number | A unique number generated by the system. |
role_type_id_1 | string | Identifies the role of the first party in the relationship. Links to the ROLE_SUBTYPE table. |
role_subtype_id_1 | string | Identifies the role of the first party in the relationship. Links to the ROLE_SUBTYPE table. |
role_type_id_2 | string | Identifies the role of the second party in the relationship. Links to the ROLE_SUBTYPE table. |
role_subtype_id_2 | string | Identifies the role of the second party in the relationship. Links to the ROLE_SUBTYPE table. |
start_date | date | The start date for this entry. |
end_date | date | The end date for this entry. Blank signifies an unspecified date in the future. |
rel_type_id | string | Links to the RELATIONSHIP_TYPE table. |
rel_priority_id | string | Links to the RELATIONSHIP_PRIORITY table. |
rel_weighting_factor | number | Optional. This may be used to provide a weighting factor between different parties who exist in the same relationship. |
rel_status_id | string | Links to the RELATIONSHIP_STATUS table. |
rel_comment | string | Free format text. |
Examples of organisation-to-organisation relationships:
Type | Party 1 | Party 1 Role | Party 2 | Party 2 Role | Start | End |
---|---|---|---|---|---|---|
Organisation Rollup | ABC Subsidiary | Subsidiary | ABC Corporation | Parent corporation | 3/4/1998 | |
Organisation Rollup | XYZ Subsidiary | Subsidiary | ABC Corporation | Parent corporation | 7/7/1999 | |
Organisation Rollup | Customer Service Division | Division | ABC Subsidiary | Subsidiary | 1/2/2000 | |
Organisation Rollup | Finance | Department | Foobar Incorporated | Parent | 1/2/2000 | |
Customer relationship | ACME Company | Customer | ABC Subsidiary | Internal organisation | 1/1/1999 | |
Agent relationship | Sellers Assistance Corporation | Sales Agent | ABC Subsidiary | Internal organisation | 6/1/1999 | 31/12/2001 |
Supplier relationship | Fantastic Supplies | Supplier | ABC Subsidiary | Internal organisation | 4/5/2001 |
Examples of person-to-organisation relationships:
Type | Party 1 | Party 1 Role | Party 2 | Party 2 Role | Start | End |
---|---|---|---|---|---|---|
Employment | John Smith | Employee | ABC Subsidiary | Employer | 1/12/1989 | 12/1/1999 |
Employment | William Smith | Employee | Finance | Department | 1/1/2010 | |
Employment | William Jones | Employee | ABC Subsidiary | Employer | 5/7/1990 | |
Employment | Peter Smith | Employee | Superior Supplies | Supplier | 7/5/2010 | |
Supplier contact | Nancy Barry | Supplier Coordinator | Fantastic Supplies | Supplier | 28/2/1999 | |
Customer contact | Marc Martinez | Customer contact | ACME Company | Customer | 3/8/2001 | |
Contractor relationship | Barry Cunningham | Contractor | ABC Corporation | Internal organisation | 1/1/2001 | 31/12/2001 |
Examples of person-to-person relationships:
Type | Party 1 | Party 1 Role | Party 2 | Party 2 Role | Start | End |
---|---|---|---|---|---|---|
Employment | Terry Jones | Supervisor | Nicholas Bartholemew | Subordinate | 15/3/1999 | |
Supplier contact | John Smith | Supplier coordinator | Nancy Barry | Supplier service contact | 15/3/1999 | |
Customer contact | William Jones | Account manager | Marc Martinez | Customer contact | 5/10/1999 | |
Parent-child relationship | John Smith | Parent | Judy Smith | Child | 4/5/1979 |
Each POSTAL_ADDRESS is identified by a series of GEOGRAPHIC_AREAS each of which is a different GEOGRAPHIC_AREA_TYPE such as POSTCODE, CITY/TOWN, COUNTY or COUNTRY. Some area types may not be for postal addresses but for other purposes such as sales areas, delivery zones or tax areas.
Each country has its own POSTAL_ADDRESS_STRUCTURE which identifies which GEOGRAPHIC_AREA_TYPES are valid for that country. So where the UK has "county" the USA will have "state", for example.
The GEOGRAPHIC_AREA_HIERARCHY table is used to identify which smaller areas are enclosed within which larger areas. As well as being able to identify which cities are in which counties, this also identifies which addresses are in which sales areas or delivery zones.
Figure 6 - Postal Addresses and Geographic Areas
This is used to categorise each GEOGRAPHIC_AREA by type. Each country has its own POSTAL_ADDRESS_STRUCTURE which identifies which types are valid for that country.
Field | Type | Description |
---|---|---|
area_type_id | string | Identity |
area_type_desc | string | Description |
is_postal_address | boolean | TRUE or FALSE. This is to signify whether entries of this type form part of postal addresses, or if they are purely for administrative purposes, such as sales areas or delivery areas. When constructing a postal address only those entries with this value set to TRUE will be included in the address string. |
uppercase_names | boolean | TRUE or FALSE. If TRUE this will cause all entries of this type to be shifted into upper case. This is used only when entries are being input individually. When being input as part of a complete address then the is_uppercase_??? switches on the POSTAL_ADDRESS_STRUCTURE record for that country will be used instead. |
Here are some examples:
Type | Is Postal? | Uppercase? |
---|---|---|
Country | Yes | No |
County | Yes | No |
Town/City | Yes | Yes |
Postcode | Yes | No |
US State | Yes | No |
US Zip Code | Yes | No |
Province | Yes | No |
Prefecture | Yes | No |
Sales Area | No | No |
Delivery Zone | No | No |
UK Postcode | Yes | No |
UK Town/City | Yes | Yes |
UK County | Yes | No |
By having separate types for each country it becomes easier to distinguish entries with the same name which exist in different countries, such as Birmingham (UK) and Birmingham (Alabama), or Kingston (Surrey) and Kingston (Jamaica).
Each geographical area is recorded once with a unique identification number, then referenced by this number.
Field | Type | Description |
---|---|---|
area_id | number | Identity number which is generated by the system |
area_type_id | string | Links to the GEOGRAPHIC_AREA_TYPE table. |
area_name | string | The name of this particular area. |
area_abbreviation | string | Optional. Some area names may have recognisable abbreviations, so when inputting an address either the full name or the abbreviation can be used to identify the entry. |
Here are some examples:
Id | Type | Name | Abbreviation |
---|---|---|---|
1 | Country | United Kingdom | UK |
2 | Country | United States of America | USA |
15 | UK County | Bedfordshire | Beds |
16 | UK County | Berkshire | Berks |
17 | UK County | Buckinghamshire | Bucks |
18 | UK County | Hampshire | Hants |
150 | US State | Alaska | AK |
151 | US State | Alabama | AL |
152 | US State | Arkansas | AR |
152 | US State | Arizona | AZ |
200 | UK City/Town | Birmingham | |
254 | UK City/Town | Hayes | |
257 | UK City/Town | Hayes | |
300 | US City/Town | Birmingham | |
300 | UK Postcode | AA1 1AA | |
400 | US Zip Code | 90210 |
You may notice that there are two entries for a UK City/Town called Hayes - with id's if 254 and 257. That is because there are two different towns with the same name - Hayes (Middlesex) and Hayes (Kent). There are also two towns called Birmingham, but they have different types which signify that they belong in different countries.
Some geographical areas may have alternative spellings or even alternative names. This table allows a geographical area to be linked with any number of aliases.
Field | Type | Description |
---|---|---|
area_type_id | string | Links to the GEOGRAPHIC_AREA_TYPE table. |
area_id | number | Links to the GEOGRAPHIC_AREA table. |
alias_name | string | The name of this particular area. |
Note that a particular combination of area_type_id and area_name cannot exist on both the GEOGRAPHIC_AREA and GEOGRAPHIC_AREA_ALIAS tables.
Here are some examples:
Where an alias may be spelt either with or without any periods, such as for 'W. Yorkshire' and 'W Yorkshire', it is only necessary to create a single alias with periods as the search will automatically include an additional lookup with any periods removed.
This table is used to identify which areas enclose other areas, such as which towns belong in which counties, or which postcodes belong in which towns.
Field | Type | Description |
---|---|---|
area_id_snr | number | Identifies the senior/parent entry in the hierarchy. Links to the GEOGRAPHIC_AREA table. |
area_id_jnr | number | Identifies the junior/child entry in the hierarchy. Links to the GEOGRAPHIC_AREA table. |
Here are some examples:
Junior | Senior | ||
---|---|---|---|
Id | Type | Name | Id |
258 | UK Postcode | KK1 1KK | 257 |
257 | UK City/Town | Hayes | 20 |
20 | UK County | Kent | 63 |
20 | UK County | Kent | 216 |
216 | Sales Area | Southern Sales Area | |
63 | Country | England | 1 |
1 | Country | United Kingdom | |
261 | UK Postcode | MM1 1MM | 254 |
254 | UK City/Town | Hayes | 256 |
256 | UK County | Middlesex | 63 |
256 | UK County | Kent | 216 |
By traversing up this hierarchy from junior to senior it is possible to reconstruct a postal address. For example, with 258 as the starting point we get KK1 1KK, Hayes, Kent, England
and with 261 we get MM1 1MM, Hayes, Middlesex, England
. Note also that while both Kent and Middlesex belong in the country of England, they also belong in the same Southern Sales Area (216).
By traversing down his hierarchy from senior to junior it is possible to identify which smaller areas exist within any given larger area. For example, with 63 as the starting point we can list all the English counties, then the towns that exist within each county, and so on.
Using this structure it is possible to create any hierarchy of geographical areas that you can imagine, so any area can belong in any number of other areas (although only one path should produce a postal address). It is also possible to reflect the fact that while the United Kingdom is a country, it is comprised of England, Scotland and Wales which are also countries.
This is only valid for those GEOGRAPHIC_AREAS which have a GEOGRAPHIC_AREA_TYPE of "country" as it identifies the address structure that is to be used for that country, and how its addresses are to be printed.
This is where the creation of different GEOGRAPHIC_AREA_TYPES for each different country become useful. Once the country has been identified it is possible to restrict each component of the address to a particular type, so that if a UK County is requested, for example, it is not possible to select a US state.
Field | Type | Description |
---|---|---|
country_id | number | Links to an entry on the GEOGRAPHIC_AREA table which must be of type "country". |
country_code | string | Unique. Country code (ISO-3166). Only countries which have a country code can be included in the dropdown list in address screens. |
area_type_id_city | string | Optional. Links to an entry on the GEOGRAPHIC_AREA_TYPE table which will be used as the "town/city" portion of the address. |
area_type_id_county | string | Optional. Links to an entry on the GEOGRAPHIC_AREA_TYPE table which will be used as the "county/state/region/territory" portion of the address. |
area_type_id_postcode | string | Optional. Links to an entry on the GEOGRAPHIC_AREA_TYPE table which will be used as the "postcode/zipcode" portion of the address. |
is_required_city | boolean | Signifies if this element of the address is required or not. |
is_required_county | boolean | Signifies if this element of the address is required or not. |
is_required_postcode | boolean | Signifies if this element of the address is required or not. |
is_uppercase_city | boolean | Signifies if this element of the address is to be shifted into uppercase or not. |
is_uppercase_county | boolean | Signifies if this element of the address is to be shifted into uppercase or not. |
is_uppercase_postcode | boolean | Signifies if this element of the address is to be shifted into uppercase or not. |
is_printed_country | boolean | Signifies if the country name is to be included when the address string is assembled. This is normally only set to TRUE for addresses in foreign countries. |
postcode_position | string | Identifies how the address string is to be assembled from its component parts. The following options are available:
|
name_position | string | Identifies where the customer's name is positioned when the address is formatted on a printable document. The following options are available:
|
postcode_pattern | string | Optional. This identifies the pattern (a regular expression) to which any input must conform. |
exclude_from_dropdown | boolean | If set to TRUE this will prevent the country from being included in the dropdown list used in the front office website. This will allow countries to be excluded without having to delete their details. |
in_european_union | boolean | This is used when adding automatic order adjustments for sales tax as by default sales to other countries do not attract any sort of sales tax - except in the European Union. |
Here are some examples:
Country | City/Town | Rqd | County/State | Rqd | Postcode | Rqd | Country Printed? | Postcode Position |
---|---|---|---|---|---|---|---|---|
UK | UK City/Town | Yes | UK County | No | UK Postcode | Yes | No | Default |
USA | US City/Town | Yes | US State | Yes | US Zip Code | Yes | Yes | After State Abbreviation |
France | French City/Town | Yes | No | French Postcode | Yes | Yes | Before City Name |
Each postal address is actually comprised of data which is held on two tables - the textual part which is held on this table, and the links to GEOGRAPHIC_AREAS which are held on the POSTAL_ADDRESS_AREA table.
Field | Type | Description |
---|---|---|
address_id | number | Identity number which is generated by the system |
address1 | string | Free format text. Holds any localised address information (house name, house number, flat number, floor number, building name). |
address2 | string | Optional. Free format text. Continuation of ADDRESS1. |
address3 | string | Optional. Free format text. Continuation of ADDRESS2. |
address_notes | string | Optional. Free format text |
Here are some examples:
Id | Address1 | Address2 | Address3 |
---|---|---|---|
1 | Flat 37 | Tall Building | Station Road |
2 | 88 High Street |
This provides the identities of the GEOGRAPHIC_AREAS which, when combined with the contents of the POSTAL_ADDRESS table, will produce a full postal address.
Field | Type | Description |
---|---|---|
address_id | number | Links to the POSTAL_ADDRESS table. |
seq_no | number | Identity number assigned by the system. Possible values are:
The POSTAL_ADDRESS_STRUCTURE entry for the country identifies which types of GEOGRAPHIC_AREA are valid for each of the postcode, town and county portions. |
area_id | number | Links to the GEOGRAPHIC_AREA table. |
Here are some examples:
Address Id | Seq No | Area Id | Area Name |
---|---|---|---|
1 | 1 | 261 | MM1 1MM |
1 | 2 | 254 | Hayes |
1 | 3 | 256 | Middlesex |
1 | 4 | 63 | England |
When the full address is required for printing in can quickly be assembled into the following:
Flat 37 Tall Building Station Road Hayes Middlesex MM1 1MM
This structure also allows all those addresses which belong in any GEOGRAPHIC_AREA to be quickly identified without having to traverse the GEOGRAPHIC_AREA_HIERARCHY table.
A CONTACT_MECHANISM is a method of communicating with a PARTY and may be any one of various TYPES, which includes a POSTAL_ADDRESS.
A CONTACT_MECHANISM can be shared by more than one PARTY, and a PARTY may have more than one CONTACT_MECHANISM, so all the possible combinations are held on a separate PARTY_CONTACT_MECHANISM table. Each of these combinations may also have a ROLE and any number of PURPOSES.
Some contact mechanisms may be related to each other, such as a postal addresses having related telephone numbers, or a telephone number having an alternative number should it be busy. These relationships can be recorded on the CONTACT_MECHANISM_LINK table.
Figure 7 - Party Contact Mechanism
This is used to categorise each CONTACT_MECHANISM by type.
Field | Type | Description |
---|---|---|
contact_mech_type_id | string | Identity |
contact_mech_type_desc | string | Description |
contact_mech_format | string | Identifies the format of this type of entry. Current values are:
|
Here are some examples:
This holds all the possible mechanisms which may be used to contact parties. The actual party (or parties) to which each mechanism is linked is held on the PARTY_CONTACT_MECHANISM table.
Field | Type | Description |
---|---|---|
contact_mechanism_id | number | Identity number which is generated by the system |
contact_mech_type_id | string | Links to the CONTACT_MECHANISM_TYPE table. The type chosen will dictate which of the other fields need to be supplied. |
contact_string | string | All the component parts assembled into a single string |
contact_extension | number | Optional. The extension portion of a telephone number |
address_id | number | Optional. Links to the POSTAL_ADDRESS table. |
Here are some examples:
Id | Type | Contact String | Extension | Address Id |
---|---|---|---|---|
1 | fred.bloggs@somewhere.com | |||
2 | phone | 44-020-1235678 | ||
3 | url | www.veryimportant.com | ||
4 | address | 1 High Street, Anytown, Anyshire, XX1 1XX | 2 |
Note that in the case of telephone numbers the contact string is constructed from the country code, area code, number and extension.
If a postal address is selected the contact string will show the complete address in the format specified on the ADDRESS_STRUCTURE table for that country.
This can be used to indicate when one mechanism is related to, or can be used as a substitute for, another mechanism.
Field | Type | Description |
---|---|---|
contact_mechanism_id_snr | number | Identifies the senior/parent entry in the hierarchy. Links to the CONTACT_MECHANISM table. |
contact_mechanism_id_jnr | number | Identifies the junior/child entry in the hierarchy. Links to the CONTACT_MECHANISM table. |
This is used to indicate which CONTACT_MECHANISMS are used by which PARTIES. Note that the same mechanism can be used by more than one party. Each entry is only valid for a particular time period, so it is possible to have different values for different dates.
The optional ROLE attribute can be used to signify that the particular mechanism should only be used for a particular role. For example, an organisation may provide address information only in their role as a customer, and this may not be applicable to any other role.
Each entry may also be used for one or more CONTACT_MECH_PURPOSE_TYPE, and this information is held on a separate PARTY_CONTACT_MECH_PURPOSE table.
Field | Type | Description |
---|---|---|
party_id | number | Links to the PARTY table. |
contact_mechanism_id | number | Links to the CONTACT_MECHANISM table. |
seq_no | number | Unique sequence number assigned by the system. |
role_type_id | string | Optional. Links to the ROLE_SUBTYPE table. |
role_subtype_id | string | Optional. Links to the ROLE_SUBTYPE table. |
start_date | date | Indicates the start date for this entry. |
end_date | date | Indicates the end date for this entry. Blank signifies an unspecified date in the future. |
is_soliciting_allowed | boolean | Indicates if this mechanism can be used for solicitation purposes. |
extension | number | Optional. Extension number for telephone contacts. |
contact_notes | string | Optional. Free format text |
Here are some examples:
Party | Mechanism | Role | Purpose |
---|---|---|---|
ABC Corporation | (212) 234 0958 | Main phone number | |
ABC Corporation | (212) 334 5896 | Main fax number | |
ABC Corporation | (212) 356 4898 | Secondary fax number | |
ABC Corporation | 100 Main Street | Headquarters, Billing enquiries | |
ACME Corporation | 77 Bay Road | Primary address, Billing address | |
ACME Corporation | 2004 Pacific Road | customer | Delivery Address |
This is used to identify the purposes for which a PARTY_CONTACT_MECHANISM may be used.
Field | Type | Description |
---|---|---|
contact_mech_purpose_type_id | string | Identity |
contact_mech_purpose_type_desc | string | Description |
Here are some examples:
A PARTY_CONTACT_MECHANISM may be used for more than one PURPOSE, which is why this information is held on a separate table. Each entry is only valid for a particular time period, so it is possible to have different values for different dates.
Field | Type | Description |
---|---|---|
party_id | number | Links to the PARTY_CONTACT_MECHANISM table. |
contact_mechanism_id | number | Links to the PARTY_CONTACT_MECHANISM table. |
seq_no | number | Links to the PARTY_CONTACT_MECHANISM table. |
contact_mech_purpose_type_id | string | Links to the CONTACT_MECH_PURPOSE_TYPE table. |
start_date | date | Indicates the start date for this entry. |
end_date | date | Indicates the end date for this entry. Blank signifies an unspecified date in the future. |
This database may be used by other systems, such as a web front end, which may have a requirement for extra fields to be held for each party. There is a NAMES table which holds the names of any such extra fields, with their validation types, and a VALUES table which holds a corresponding value for each party.
Although these values can be held in the database they cannot be considered when processing any business rules as their names and meanings are not part of the standard software.
Figure 8 - Party Extra Values
This identifies the names of extra fields which can be held for each party.
Field | Type | Description |
---|---|---|
extra_id | string | Identity |
extra_name | string | Short Name |
extra_desc | string | Optional. Long Description |
extra_type | string | Validation type. Allowable values are:
|
is_exportable | boolean | A YES/NO switch with an initial value of YES. It indicates if this column is to be included when data is exported to a CSV file. |
party_type | string | This identifies if the entry applies to Organisations, People, or both. |
This holds the values for any extra fields for each party.
Field | Type | Description |
---|---|---|
party_id | numeric | Links to an entry on the PARTY table. |
extra_id | string | Links to an entry on the PARTY_EXTRA_NAMES table. |
extra_value | string | This holds the value for this Extra Name with this Party. |
It is possible that this database could be supplied with party details from external systems which have their own form of identity, and this external identity would otherwise be lost when it is replaced with the internally generated identity (party_id). These tables provide the means of identifying any number of external identity types and recording their values against each party.
An example of where an external identity may be used can be found in the purchasing part of a web front-end where a customer elects to pay via an external payment processor (such as PayPal) in order to avoid having to reveal a credit card number. The customer logs on to this payment processor and authorises the payment, after which the application is given an authorisation code and the customer identity (as known to the external system). The application will use this data to create a new PARTY record, with a new party_id, but it would also be a good idea to record the external identity.
Figure 9 - Party Identification
This holds the various types of identity that can be applied to parties, such as from external sources.
Field | Type | Description |
---|---|---|
identity_type_id | string | Identity |
identity_type_desc | string | Description |
party_type | string | This identifies if the entry applies to Organisations, People, or both. |
Here are some examples:
Type | Description | Party Type |
---|---|---|
PAYPAL | PayPal Identity | Person |
Google Checkout Identity | Person | |
ABBRV | Company Abbreviation | Organisation |
ALTERNATIVE | Alternative Identification | Both |
For each party this holds all the alternative identification values.
Field | Type | Description |
---|---|---|
party_id | number | Links to an entry on the PARTY table. |
identity_type_id | string | Links to an entry on the PARTY_IDENTITY_TYPE table. |
id_value | string | Holds the identity value, which must be unique for this identity type. |
Here are some examples:
Party Id | Identity Type | Id Value |
---|---|---|
98 | PAYPAL | Foo |
98 | Bar | |
1 | ABBRV | MyCO |
Customers or suppliers for an organisation may need to have a variety of different status values in order to be granted different privileges. All parties start with the 'Pending' status, and additional values can be defined at will.
Figure 10 - Party Status
This identifies all the possible status values for a party.
Field | Type | Description |
---|---|---|
party_status_id | string | Identity |
party_status_desc | string | Description |
processing_seq | numeric | This identifies the order in which the various status values are normally processed. It is also used as the sequence in which the values are displayed in any lists as it is deemed to be more useful than simply sorting alphabetically by name. |
party_type | string | This identifies if the entry applies to Organisations, People, or both. |
template_id | string | Optional. Links to an entry on the EMAIL_TEMPLATE table. This identifies an email that will be sent out whenever this status is assigned to a party.
The email template may contain certain keywords enclosed in '#' characters. These keywords will be replaced with proper values at runtime as follows:
|
is_email_auto | boolean | If 'Yes' the email will be sent automatically, otherwise the user will be prompted first. |
Here are some possible examples:
Id | Description | Seq |
---|---|---|
PEND | Pending | 1 |
APPR1 | Approved for Credit Card payments. | 2 |
APPR2 | Approved for Account payments. | 3 |
This keeps a history of all changes in status for party. The entry with the highest sequence number is the latest.
Field | Type | Description |
---|---|---|
party_id | numeric | Links to an entry on the PARTY table. |
seq_no | numeric | Sequence number which is generated by the system. |
party_status_id | string | Links to an entry on the PARTY_STATUS table. |
status_date | date | The date on which this change was made. |
status_comment | string | Optional. The reason why this change was made. |
email_datetime | date+time | Display only. The date on which an email was sent based on template_id as defined in PARTY_STATUS. |
This part of the application deals with individual messages and not bulk messages as may be used in marketing campaigns. It is designed to be used for tracking all incoming and outgoing messages concerned with particular parties, orders or invoices.
In addition there is a TEMPLATE table which can provide the standard text for outbound messages when certain events happen in the system, and a SCHEDULE table to hold messages which are to be sent out at some time in the future.
Received/Inbound messages are obtained by running a batch task which connects to one or more email accounts on a mail server (either IMAP or POP) and reads all available messages. Note that this does not access every account on the email server, just those which have been specified (such as those that deal with customer service), so that unrelated emails in other accounts will be left untouched. It will then transfer all new messages to the EMAIL_MSG table and delete them from the mail server. Any attachments will be added to the EMAIL_ATTACHMENT table. Although this batch task can be run manually on demand from an online menu, it would normally be run in the background on a predetermined schedule, such as every 15 minutes or so.
When incoming messages are received and transferred to the EMAIL_MSG table the following steps are taken in order to link them with the appropriate party, order or invoice:
Sent/Outbound messages can be generated from two possible sources:
Certain outgoing emails may be required to have attachments automatically added. The attachments can be defined on the EMAIL_AUTO_ATTACHMENT, and the outgoing emails can be identified on the EMAIL_SIGNATURE_ATTACHMENT and ORDER_STATUS_TYPE_ATTACHMENT tables.
Queues and Cases are different ways of grouping messages together, and they are handled in the following ways:
Queues | There are two types of Queue:
When a message is initially read from the mailbox and loaded into the system it will be entered into the queue associated with that mailbox. If the message is a reply to a previously sent message then it will entered into the same queue as that sent message. As soon as a user opens an unread message that message is moved to that user's personal queue and marked as "read". This means that it disappears from the list of unread messages in the original mailbox queue. When a reply is generated the original message and the reply will be placed back into the original mailbox queue, but it will be marked as "seen" and "has been sent a reply". A message can be "pushed" to another user's personal queue by using the "Reassign" function. This will also generate an entry in the user's To-Do list on the Home Page informing him of the reassigned message. This will be shown as a hyperlink which, when clicked on, will take the user immediately to that message. |
Cases | A Case is a collection of one or more messages which are associated with the same "topic" or "thread" or "conversation". A new case is generated upon the receipt of a new message, one that is not a reply to a previously sent message.
When a message is initially read from the mailbox and loaded into the system a check will be made to see if it is a reply to a previously sent message which already has a case_id. If it does then it will share that case_id, otherwise a new case will be created for that message. The new case will not have an owner at this point. When a user opens an unread message in a new case it will be updated to show that user as the owner of that case. If a message in a case is reassigned to another user then that user will become the new owner of the case. Any replies sent out will share the same case_id as the original message. Any incoming replies to a sent message will share the same case_id as the sent message. In this way any group of messages which belong to the same case can be quickly identified and viewed. |
Figure 11 - Emails
This identifies the available queues for email processing. There may be queues for different business areas, such as 'sales' and 'purchasing', or even separate queues for individual users.
Incoming emails will initially be assigned to the queue specified on the EMAIL_MAILBOX entry. Replies to emails will be assigned to the same queue as the original email.
Messages can be moved from mailbox queues to personal queues while they are being processed, then back again once a reply has been generated.
Field | Type | Description |
---|---|---|
queue_id | string | Unique identity. If the queue is for a particular user then it must be given that user's identity on the MNU_USER table. |
queue_name | string | A descriptive name. |
is_active | boolean | A Yes/No flag which indicates if the record is active or not. Inactive records cannot be selected for new operations. |
addr_reply_to | string | Optional. If this is non-blank then all emails sent out from this queue will have their Reply-To addresses set to this value. |
email_ack_subject | string | Optional. If this is non-blank then it will be used as the subject for an acknowledgement which will be sent out automatically when a new email is received (see below for details). |
email_acknowledgement | string | Optional. If this is non-blank then it will be used as the message text for an acknowledgement which will be sent out automatically when a new email is received (see below for details). |
When an email is received the in-reply-to field in the header will indicate if the message is a reply to a previous outgoing message or a brand new message. If this is a reply then this message will be attached to the same case as the email identified in the in-reply-to field, otherwise the following will happen:
This identifies the email account(s) that will be scanned for incoming emails.
Field | Type | Description |
---|---|---|
mailbox_id | number | A unique number generated by the system. |
mailbox_name | string | This identifies the mailbox using the options which are available in the imap_open function. |
mailbox_username | string | This identifies an account within this mailbox. |
mailbox_password | string | This is the password associated with this username. |
queue_id | string | Links to an entry on the EMAIL_QUEUE table.
When messages are initially retrieved from this mailbox and transferred to the EMAIL_MSG table they will be allocated to this queue. |
accept_all_addresses | boolean | It is possible for the mail server to be configured in such a way that emails with different addresses could be directed to the same mailbox. For example, the mailbox for 'sales' could also contain messages addressed to 'info'. This flag tells the system whether to transfer such messages to the database or not. Possible values are:
|
is_open | boolean | This is set to 'open' by the batch program which transfers messages from the mail server to the EMAIL_MSG table, and reset to 'closed' when it finishes. If the program aborts then it will be left 'open', in which case the message transfer program will send an email to the site administrator who must then close that mailbox manually. |
Here are some examples:
Name | Username | Password | Queue |
---|---|---|---|
{pop3.domain.com:110/pop3}INBOX | customer.service | secret1 | Sales Queue |
{pop3.domain.com:110/pop3}INBOX | service | secret2 | Sales Queue |
{pop3.domain.com:110/pop3}INBOX | purchasing | secret3 | Purchasing Queue |
This identifies a group of emails which share the same "topic" or "thread" or "conversation". A new case is automatically created upon the receipt of a new message, while any replies, both sent and received, will share the same case_id as the original.
Field | Type | Description |
---|---|---|
case_id | numeric | Unique identity which is generated by the system. |
case_desc | string | A description, initially taken from the subject of the first email. |
case_owner | string | Links to an entry on the EMAIL_QUEUE table. |
case_status | string | Either 'Open' or 'Closed'. A case can be closed manually, or automatically if it has not had any activity in a period of time.
Any closed case will be reopened automatically upon receipt of a new reply. |
party_id | numeric | Links to an entry on the PARTY table. This identifies the external party, which can be either a customer or a supplier. |
last_activity_date | datetime | This identifies the date and time of the last activity within the case. |
sent_or_received | string | Indicates whether the last activity was for a message sent or a message received. |
This has a separate entry for each message, either sent or received.
Field | Type | Description |
---|---|---|
email_id | number | A unique number generated by the system. |
message_id | string | A unique string which is usually generated when the email is sent, as described in RFC2822. |
queue_id | string | Links to an entry on the EMAIL_QUEUE table.
When messages are initially retrieved from a mailbox and transferred to this table they will be allocated to the queue specified on the EMAIL_MAILBOX entry. When a received message is first opened it will be moved to that individual's queue. When a reply is generated for a message, the message will be moved back to the original queue. |
queue_id_original | string | Links to an entry on the EMAIL_QUEUE table. This is original queue_id for the mailbox from which the message was originally downloaded. |
case_id | numeric | Links to an entry on the EMAIL_CASE table. |
in_reply_to | string | Optional. Where a message is a reply to a previous message this will contain the message_id of that previous message. This will help the system identify when a message has a reply, and to enable quick navigation to that reply. |
sent_or_received | string | Allowable values are:
|
addr_from | string | This identifies the sender of the message. Where an email address may be presented as name <something@domain> this will contain the something@domain portion. |
addr_from_personal | string | Optional. Where an email address may be presented as name <something@domain> this will contain the name portion. |
addr_to | string | This identifies the recipient of the message. It may be in the format name <something@domain> or just something@domain . |
addr_reply_to | string | Optional. Although a message should always have an addr_from address it is possible that the sender would like any replies sent to an alternative address. This is that alternative address. |
addr_cc | string | Optional. As well as the main recipient(s) in the addr_to field, it is also possible to send what is known as a 'carbon copy' of the message to others. |
addr_bcc | string | Optional. As well as the main recipient(s) in the addr_to and addr_cc fields, it is also possible to send what is known as a 'blind carbon copy' of the message to others. |
datetime | datetime | This records the date and time when the message was generated. |
subject | string | This is the subject line for the message. |
size | number | This is the size in bytes of the message body. |
charset | string | This identifies the character set of the message. |
message_text | string | This is the body of the message in plain text format. If a received message was in HTML format the HTML representation will be stored as an attachment. |
raw_header | string | This contains control information for all received messages, and can be viewed using a separate screen. |
is_seen | boolean | When an incoming message is initially received this will be set to N (unseen). It will be automatically set to Y (seen) when the message is actually viewed.
For outgoing messages this will be set to N if the message is saved as a draft, and Y when the message has actually been sent. This field is used in the display screen so that unseen messages can be highlighted in some way, usually by setting some fields to bold, so that they can be readily identified. |
seen_by_user | string | Identifies who changed is_seen from N to Y. Applies only to incoming messages. |
seen_on_date | datetime | Identifies when is_seen was changed from N to Y. Applies only to incoming messages. |
replied_by_user | string | Identifies who sent the first reply. Applies only to incoming messages. |
replied_on_date | datetime | Identifies when the first reply was sent. Applies only to incoming messages. |
party_id | number | Optional. Links to an entry on the PARTY table. |
order_type | string | Optional. Links to an entry on the ORDER_HEADER table. |
order_id | numeric | Optional. Links to an entry on the ORDER_HEADER table. |
invoice_type | string | Optional. Links to an entry on the INVOICE_HEADER table. |
invoice_id | numeric | Optional. Links to an entry on the INVOICE_HEADER table. |
ncr_id | numeric | Optional. Links to an entry on the NON_CONFORMANCE_REPORT table. |
case_id | numeric | Optional. Links to an entry on the EMAIL_CASE table. |
requirement_id | numeric | Optional. Links to an entry on the REQUIREMENT table. |
request_id | numeric | Optional. Links to an entry on the REQUEST table. |
quote_id | numeric | Optional. Links to an entry on the QUOTE_HEADER table. |
An email may consist of just a message body, or it may have one or more attached files. In the case where an HTML email was received the message body will be shown in plain text while the HTML representation will be available as an attachment.
Field | Type | Description |
---|---|---|
email_id | number | Links to an entry on the EMAIL_MSG table. |
seq_no | number | A unique number generated by the system. |
filename | string | The name of the attached file. |
filesize | number | The size of the attached file. |
filebody | blob | The contents of the file. This is an alternative to filepath. |
filepath | string | The path to the file on disk. This is an alternative to filebody. |
It is usual for each email message to contain a signature which helps identify who sent the message. This signature may contain just a name, or it may include a job title, address and/or telephone number. This table can hold a personalised signature for each user which is added to the message text whenever that user creates an email message. This also holds the user's email address (addr_from) and an optional reply_to address if this is different.
Note that it is possible to specify a different signature for each queue. The entry without a specific queue_id is the default, and will be used if a signature for the specified queue does not exist.
Field | Type | Description |
---|---|---|
user_id | string | Links to an entry on the MNU_USER table. |
queue_id | string | Optional. Links to an entry on the EMAIL_QUEUE table. |
addr_from | string | The email address that will be used as the 'From' address for all messages generated by this user. |
addr_reply_to | string | Optional. The email address that will be used as the 'Reply To' address for all messages generated by this user. Note that this may be overridden by the 'Reply To' address from the selected EMAIL_QUEUE record. |
signature_text | string | The email signature for this user. |
There may be a requirement for certain outgoing emails to have one or more attachments automatically added. For example, German law requires that all outgoing emails contain a copy of the T&C's (Terms and Conditions) and the Returns Policy. These can be defined as automatic attachments, and then linked with the required email signatures.
Field | Type | Description |
---|---|---|
attachment_id | number | A unique number generated by the system. |
attachment_desc | string | Description. |
filename | string | The name of the attached file. Currently only PDF attachments are supported. |
filesize | number | The size of the attached file. |
filebody | blob | The contents of the file. |
This identifies when outgoing emails which are created using this signature need to have attachments automatically added.
Field | Type | Description |
---|---|---|
user_id | string | Links to an entry on the EMAIL_SIGNATURE table. |
queue_id | string | Links to an entry on the EMAIL_QUEUE table. |
attachment_id | number | Links to an entry on the EMAIL_AUTO_ATTACHMENT table. |
This identifies email addresses for which auto-acknowledgements for incoming emails should not be sent out. This could be because the sender is not a customer with a genuine query.
Field | Type | Description |
---|---|---|
email_address | string | An email address. |
This identifies the text to be used for email messages which are sent out in response to certain system events such as "account created" or "sales order received".
Field | Type | Description |
---|---|---|
template_id | string | Identity. |
template_desc | string | Description. |
use_wysiwyg_editor | boolean | Identifies if the WYSIWYG (What You See Is What You Get) editor should be used to edit the contents of email_template. This is a javascript editor which will allow the message to be defined in HTML format instead of plain text. |
email_subject | string | This is the subject line for the email template. |
email_template | string | This contains an email message which may have certain keywords enclosed in '#' characters. These keywords will be replaced with actual values when the message is sent. The available keywords will depend upon the table from which the message is generated. |
delay_period | number | Optional. This is used with delay_unit in order to specify the time delay before the next email is scheduled by adding a record to the EMAIL_SCHEDULE table. It requires that either or both of repeat_count and template_id_next are also specified.
If repeat_count is specified then this email will be repeated this number of times. If template_id_next is specified then that different email will be scheduled at the end of the delay period. if repeat_count has also been specified then this must be reduced to zero before template_id_next is used. Note that delay_period and delay_unit must be used in unison - both must be either blank or both must be non-blank. |
delay_unit | string | Optional. This defines the units for delay_period and must be one of the following:
Note that delay_period and delay_unit must be used in unison - both must be either blank or both must be non-blank. |
repeat_count | number | Optional. This identifies the number of times that this email must be repeated after a delay of delay_period. |
template_id_next | string | Optional. Links to a different entry on the EMAIL_TEMPLATE table. |
This is used when an outbound email needs to be followed up with another email, either the same one or a different one, at a future date. This is controlled by the values for delay_period, repeat_count and template_id_next on the parent EMAIL_TEMPLATE record.
Field | Type | Description |
---|---|---|
schedule_id | number | Identity number which is generated by the system. |
template_id | string | Links to an entry on the EMAIL_TEMPLATE table. |
date_scheduled | date | The date on which this email is due to be sent. |
schedule_status_id | string | The current status of this entry. Allowable values are:
|
date_sent | date+time | Optional. The date on which this email was actually sent. |
repeat_count | number | Optional. The number of times that this email has been repeated. If this value is less than the number on the parent EMAIL_TEMPLATE record then another will be scheduled by adding the delay_period to the current date. |
party_id | number | Optional. Links to an entry on the PARTY table. |
object_id | string | Identifies the object which will be used to obtain any values which should be inserted into the message template. If the array of values includes an entry for rdc_email_cancelled this will indicate that the email is no longer required, it which case it will be cancelled. |
context | string | Identifies the context which will be passed to object_id. |
Parties with whom the organisation does business may have terms to cover different aspects of that business. Each party may have one or more terms which are categorised by TERM_TYPE.
Figure 12 - Party Terms
This identifies the category or type of term which is available for parties.
Field | Type | Description |
---|---|---|
term_type_id | string | Identity |
term_type_name | string | A short name. |
term_type_desc | string | A longer description which would be suitable for adding to printed documents. |
is_value_required | boolean | This identifies if an additional value is required when this term is attached to an order or order item. |
default_value | numeric | If is_value_required is 'Y' then this can be used as the default. |
is_place_required | boolean | This identifies if an additional value is required when this term is attached to an order or order item.
This is used for Incoterms. |
default_place | string | If is_place_required is 'Y' then this can be used as the default. |
Here are some examples:
ID | Name | Description | Value Required? | Default Value | Place Required? | Default Place |
---|---|---|---|---|---|---|
CWP | Cancellation Period | Days within which one may cancel order without a penalty | Y | 5 | N | |
PCC | Cancellation Charge | Percentage cancellation charge | Y | 1 | N | |
NOXRFND | Refund Policy | No exchanges or refunds once delivered | N | N | ||
NONPERF | Nonperformance Penalty | Percentage penalty paid by supplier for non-performance | Y | 2 | N | |
DELIV | Delivery Deadline | Number of days within which delivery must occur | Y | 10 | N | |
NET-7 | NET 7 days | Payment due within 7 days | Y | 7 | N | |
NET-30 | NET 30 days | Payment due within 30 days | Y | 30 | N | |
NET-60 | NET 60 days | Payment due within 60 days | Y | 60 | N | |
ESD-2-10 | Early Settlement Discount | A discount of 2% to be applied if the invoice is settled within 10 days | Y | 10 | N | |
Below are examples of Incoterms. | ||||||
ICC-CFR | CFR | Cost and Freight (named port of destination) | N | Y | ||
ICC-CIF | CIF | Cost, Insurance & Freight (named port of destination) | N | Y | ||
ICC-CIP | CIP | Carriage and Insurance Paid to (named place of destination) | N | Y | ||
ICC-CPT | CPT | Carriage Paid To (named place of destination) | N | Y | ||
ICC_DAP | DAP | Delivered At Place (named place of destination) | N | Y | ||
ICC_DDP | DDP | Delivered Duty Paid (named place of destination) | N | Y | ||
ICC_DPU | DPU | Delivered At Place Unloaded (named place of destination) | N | Y | ||
ICC_EXW | EXW | Ex Works (named place of delivery) | N | Y | ||
ICC_FAS | FAS | Free Alongside Ship (named port of shipment) | N | Y | ||
ICC_FCA | FCA | Free Carrier (named place of delivery) | N | Y | ||
ICC_FOB | FOB | Free on Board (named port of shipment) | N | Y |
This identifies the terms which have been added to a party.
Field | Type | Description |
---|---|---|
party_id | numeric | Links to an entry on the PARTY table. |
seq_no | numeric | A number which is generated by the system. |
term_type_id | string | Links to an entry on the TERM_TYPE table. |
value | numeric | Required if is_value_required on TERM_TYPE is 'Y', otherwise it must be empty. |
place_name | numeric | Required if is_place_required on TERM_TYPE is 'Y', otherwise it must be empty. |
Calendars are used to identify when a date is a working day or not. Different organisations may have their own rules on what is or is not a working day which may or may not take into account weekends and national holidays. A different calendar can be created for each different set of rules.
Figure 13 - Calendars
This identifies the different calendars which may be used within the system. Each calendar has a different mechanism for identifying what is or is not a working day. This information is used, for example, to calculate the expected delivery date for a product based upon its lead time.
Field | Type | Description |
---|---|---|
calendar_id | numeric | Identity number which is generated by the system. |
calendar_desc | string | Description |
calendar_timezone | string | This identifies the time zone on which this calendar is based. If an organisation has facilities in different time zones then each will require its own calendar. |
initialisation_method | numeric | This identifies how the working days in each year are calculated. The possible values are:
|
holiday_rule | string | This identifies a class file which is used to calculate the properties of each day within a calendar year. This values is required when initialisation_method is '3' and ignored for other values.
A sample file is provided in lib.calendar_uk.class.inc which can be cloned and amended as required. |
default_shifts | numeric | The default number of shifts in each working day. Values must be in the range 1-3. |
default_shift_hours | numeric | The default number of hours in each shift. When multiplied by the number of shifts the total value must not exceed 24. |
This identifies the properties of each date within each calendar year for a particular calendar. A new set of default values is generated manually for each year, after which the details for individual dates can be amended as required.
Field | Type | Description |
---|---|---|
calendar_id | numeric | Links to an entry on the CALENDAR_HEADER table. |
calendar_date | date | An actual date in the format '2014-12-31'. |
is_workday | boolean | Identifies whether this day is a working day or not. Possible values are Y (Yes) or N (No). |
shifts | numeric | Identifies how many shifts are worked on this date. Values must be in the range 1-3. |
shift_hours | numeric | The number of hours in each shift. When multiplied by the number of shifts the total value must not exceed 24. |
This information exists within a shared table in the MENU database and not a separate table within the ORDER database. It holds values which can be varied to suit that particular installation. The current values are as follows:
Name | Value | Description |
---|---|---|
Copy emails to database? | No | If this is set to 'Yes' then a copy of all generated emails will be copied to the EMAIL_MSG table. |
Maximum size for email attachments in DB | 0 | This is the maximum size for email attachments to be stored in the database. Any attachment which exceeds this size will be stored in the file system. Allowed values are '0', 'nK' (Kilobytes), or 'nM' (Megabytes). |
Close Inactive Cases after N days | 7 | This identifies the number of days after which an inactive case will be closed. |
Use WYSIWYG editor for Email Templates? | N | If set to 'Y' this will allow the email_template on the EMAIL_TEMPLATE table to be maintained using a WYSIWYG editor, which makes it easier to have the text in HTML format. |
There may be cases where a transaction requires user input and a particular value or values remains constant for all instances of that transaction. In order to avoid having to manually input the same value(s) each time the transaction is run it is possible to define each of those values in the database and have those values automatically included in the user input. For maximum flexibility the following tables in the MENU database are used:
Table | Description |
---|---|
mnu_task_field | Identifies the field names within each task for which initial values can be defined. Entries must be created here for each task+field before any initial values can be defined for a task+field. |
mnu_initial_value_role | This defines the initial values which are to be used when users within this role execute this task. |
mnu_initial_value_user | This defines the initial values which are to be used when this user executes this task.
Note that USER values take precedence over ROLE values. |
Here are some typical cases:
Task | Field | Description |
---|---|---|
py_party_relationship(add1) (add party relationship) |
rel_priority_id | The relationship priority. |
rel_status_id | The relationship status. | |
py_party_relationship(add2) (add party relationship) |
rel_priority_id | The relationship priority. |
rel_status_id | The relationship status. |
Date created: 31st July 2007
5th May 2023 | Updated the EMAIL_MSG table to include the requirement_id, request_id and quote_id columns. |
6th Aug 2021 | Replaced Figure1b with Table 1. |
9th May 2021 | Updated the TERM_TABLE table to include the is_place_required and default_place_name columns.
Updated the PARTY_TERMS table to include the place_name column. |
28th Oct 2020 | Updated the TERM_TYPE table to rename the term_type_desc column to term_type_name and the term_type_text column to term_type_desc. |
3rd Mar 2019 | Updated the POSTAL_ADDRESS_STRUCTURE table to include the in_european_union column. |
6th May 2016 | Updated the PARTY_EXTRA_NAMES table to include the party_type column.
Updated the PARTY_IDENTITY_TYPE table to include the party_type column. Updated the PERSON table to include the is_assessed_employee column. |
16th Mar 2016 | Updated the PARTY_RELATIONSHIP table to include the rel_weighting_factor column. |
3rd Sep 2015 | Added the EMAIL_SCHEDULE and EMAIL_TEMPLATE tables.
Updated the PARTY_STATUS table to remove the email_template and email_subject columns, and to add the party_type and template_id columns. |
2nd Apr 2015 | Updated the RELATIONSHIP_PRIORITY table to include the sort_seq column. |
4th Feb 2015 | Updated the CONTACT_MECHANISM table to remove the country_code, area_code and contact_number columns. |
23rd Nov 2014 | Updated the TERM_TYPE table to include the term_type_text and default_value columns. |
21st Oct 2014 | Added the PARTY_STATUS and PARTY_STATUS_HIST table.
Updated the PARTY table to include the party_status_id column. |
7th July 2014 | Added the CALENDAR_HEADER and CALENDAR_DATE table.
Updated the PARTY table to include the calendar_id column. |
20th Jun 2014 | Added the TERM_TYPE and PARTY_TERMS table. |
18th Jun 2014 | Updated the ORGANISATION table to include the currency_code_local column. |
4th May 2014 | Updated the POSTAL_ADDRESS_STRUCTURE table to include the name_position column. |
15th Dec 2013 | Added the EMAIL_BLACKLIST table. |
9th Nov 2013 | Added the EMAIL_AUTO_ATTACHMENT and EMAIL_SIGNATURE_ATTACHMENT tables. |
11th Jun 2012 | Updated the EMAIL_MAILBOX table to include the is_open column. |
13th Feb 2012 | Updated the EMAIL_QUEUE table to include the is_active column. |
7th Jul 2011 | Updated the EMAIL_QUEUE table to include the email_acknowledgement and email_ack_subject columns. |
22nd Mar 2011 | Added the exclude_from_dropdown column to the POSTAL_ADDRESS_STRUCTURE table.
Added the addr_bcc column to the EMAIL_MSG table. |
19th Oct 2010 | Added the EMAIL_CASE table. |
11th Oct 2010 | Updated the EMAIL_MSG table to include the queue_id_original column. |
8th Oct 2010 | Updated the EMAIL_ATTACHMENT table to include the filesize column. |
30th Sept 2010 | Updated the EMAIL_QUEUE table to include the addr_reply_to column.
Updated the EMAIL_SIGNATURE table to include the queue_id column. Updated the EMAIL_MAILBOX table to include the accept_all_addresses column. |
11th Sept 2010 | Added the GEOGRAPHIC_AREA_ALIAS table. |
13th July 2010 | Added the PARTY_NOTES table.
Deleted the PARTY_COMMUNICATION table. |
12th July 2010 | Added the EMAIL_QUEUE table.
Updated the EMAIL_MAILBOX table to include the queue_id column. Updated the EMAIL_MSG table to include the queue_id, seen_by_user and seen_on_date columns. |
18th May 2010 | Added the EMAIL_MSG, EMAIL_ATTACHMENT and EMAIL_SIGNATURE tables. |
21st Dec 2008 | Added the PARTY_IDENTIFICATION and PARTY_IDENTITY_TYPE tables. |
9th July 2008 | Updated the PARTY table to include the language_id column. |
4th July 2008 | Updated the POSTAL_ADDRESS_STRUCTURE table to include the country_code column. |
17th June 2008 | Updated the PARTY_EXTRA_NAMES table to include the is_exportable column. |
4th May 2008 | Updated the POSTAL_ADDRESS_STRUCTURE table to include the following columns:
|
26th Mar 2008 | Added columns dob, marital_status and nat_ins_no to the PERSON table.
Added PARTY_EXTRA_NAMES and PARTY_EXTRA_VALUES tables. |
28th Feb 2008 | Added column postcode_pattern to the POSTAL_ADDRESS_STRUCTURE table. |
Copyright © 1999-2023 by Geoprise Technologies Licensing, All Rights Reserved.