Essential lookup tables and reference information for working with the account hierarchy.
Common Parent Account IDs
| Parent | ID | Hierarchy |
|---|
| UPS | 1197 | 1:N:N |
| McKesson | 1209 | 1:N:N |
| Goodwill Industries of Kentucky | 1002 | 1:1:N |
| Sonepar | 1195 | 1:1:N |
| Ball Corp | 1356 | 1:1:N |
Data Cleaning Functions
| Option | Type | Description | Default |
|---|
dbo.udf_remove_punc_spaces() | UDF | Clean address formatting - removes punctuation and extra spaces | — |
dbo.udf_null_if_blank() | UDF | Convert empty strings to NULL for cleaner data | — |
dbo.udf_initcap() | UDF | Proper case formatting (Title Case) | — |
Key Join Fields
| Portal Field | CieTrade Field | Notes |
|---|
cietrade_account_id | accounts.account_id | CPID - counterparty identifier |
cietrade_address_id | addresses.address_id | Location identifier |
location_name | addresses.location_name | Business key - must match exactly |
Exclusion List
See the full exclusion list — vendor CPIDs, seasonal accounts, and special cases — in the CRM Guide.
| Document | Location | Purpose |
|---|
| DDL & ERD | ddl/README.md | Column definitions, indexes |
| Templates | create_new_account/README.md | Template selection guide |
| Sync Scripts | sync/README.md | Execution order |
| WDP Integration | wg_data_platform/README.md | Reporting architecture |
| Business Rules | BUSINESS_RULES.md | Account-specific rules |
Next Steps