Appearance
dbo.primeContacts
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeContacts.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | id | uniqueidentifier | no | Primary key / unique identifier for this record | |
| 2 | type | nvarchar(50) | yes | Category/type classification of this record | |
| 3 | status | nvarchar(50) | yes | Current status of this record | |
| 4 | position | nvarchar(255) | yes | Sort order/position of this item | |
| 5 | isIndividual | bit | yes | Flag indicating the contact is an individual (as opposed to a company) | |
| 6 | name | nvarchar(255) | yes | Display name | |
| 7 | firstName | nvarchar(255) | yes | Contact's first name | |
| 8 | lastName | nvarchar(255) | yes | Contact's last name | |
| 9 | salutation | nvarchar(100) | yes | Preferred title/salutation for the contact | |
| 10 | contactType | nvarchar(100) | yes | Type/category of contact (e.g. Customer, Insurer, Broker) | |
| 11 | primaryContact | nvarchar(255) | yes | Display name of the primary contact | |
| 12 | homeNumber | nvarchar(50) | yes | Contact's home phone number | |
| 13 | mobileNumber | nvarchar(50) | yes | Contact's mobile phone number | |
| 14 | workNumber | nvarchar(50) | yes | Contact's work phone number | |
| 15 | preferredContactNumber | nvarchar(50) | yes | Contact's preferred phone number | |
| 16 | preferredContactNumberValue | nvarchar(255) | yes | Value of the contact's preferred phone number | |
| 17 | contactEmail | nvarchar(255) | yes | Contact email address | |
| 18 | abn | nvarchar(50) | yes | Australian Business Number of the contact/company | |
| 19 | acn | nvarchar(50) | yes | Australian Company Number of the contact/company | |
| 20 | financeRef | nvarchar(100) | yes | Finance system reference for this record | |
| 21 | levesysRef | nvarchar(100) | yes | Levesys accounting system reference for this record | |
| 22 | notes | nvarchar(MAX) | yes | Free-text internal notes | |
| 23 | salesAccountNumber | nvarchar(100) | yes | Accounts-receivable account number used for sales to this contact | |
| 24 | purchasesAccountNumber | nvarchar(100) | yes | Accounts-payable account number used for purchases from this contact | |
| 25 | salesPaymentTermType | nvarchar(100) | yes | Payment term type applied to sales | |
| 26 | salesPaymentTermValue | nvarchar(100) | yes | Payment term value applied to sales | |
| 27 | purchasesPaymentTermType | nvarchar(100) | yes | Payment term type applied to purchases (e.g. Days after invoice) | |
| 28 | purchasesPaymentTermValue | nvarchar(100) | yes | Payment term value (e.g. number of days) applied to purchases | |
| 29 | linkedToContactId | uniqueidentifier | yes | Foreign key to the related primeContacts record this relationship links to | |
| 30 | addressLine1 | nvarchar(255) | yes | First line of the site/property street address | |
| 31 | addressLine2 | nvarchar(255) | yes | Second line of the site/property street address | |
| 32 | addressSuburb | nvarchar(100) | yes | Suburb of the contact address | |
| 33 | addressState | nvarchar(100) | yes | State/territory of the contact address | |
| 34 | addressCountry | nvarchar(100) | yes | Country of the contact address | |
| 35 | addressPostcode | nvarchar(20) | yes | Postcode of the contact address | |
| 36 | postalAddressLine1 | nvarchar(255) | yes | First line of the postal address | |
| 37 | postalAddressLine2 | nvarchar(255) | yes | Second line of the postal address | |
| 38 | postalAddressSuburb | nvarchar(100) | yes | Suburb of the postal address | |
| 39 | postalAddressState | nvarchar(100) | yes | State/territory of the postal address | |
| 40 | postalAddressCountry | nvarchar(100) | yes | Country of the postal address | |
| 41 | postalAddressPostcode | nvarchar(20) | yes | Postcode of the postal address | |
| 42 | subcontractor | nvarchar(MAX) | yes | Name of the subcontractor | |
| 43 | createdAt | datetime | yes | Timestamp the record was created | |
| 44 | createdBy | nvarchar(100) | yes | User/system that created the record | |
| 45 | updatedAt | datetime | yes | Timestamp the record was last updated | |
| 46 | updatedBy | nvarchar(100) | yes | User/system that last updated the record | |
| 47 | version | bigint | yes | Optimistic-concurrency row version number | |
| 48 | mobileNumber_Normalized | nvarchar(50) | yes | computed | Contact's mobile phone number in normalized/standard format |
| 49 | homeNumber_Normalized | nvarchar(50) | yes | computed | Contact's home phone number in normalized/standard format |
| 50 | workNumber_Normalized | nvarchar(50) | yes | computed | Contact's work phone number in normalized/standard format |
| 51 | FilterTags | nvarchar(MAX) | yes | Comma-separated display list of filter tags applied to this record | |
| 52 | FilterTagIds | nvarchar(MAX) | yes | Comma-separated list of primeFilterTags identifiers applied to this record | |
| 53 | RegionIds | nvarchar(MAX) | yes | Comma-separated list of region identifiers |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__ethPrime__3213E83FF76D95DE | CLUSTERED | yes | yes | id | ||
| IX_primeContacts_mobile_work | NONCLUSTERED | mobileNumber, workNumber | ||||
| IX_primeContacts_mobileNumber_Norm | NONCLUSTERED | mobileNumber_Normalized | firstName, id, lastName, name | |||
| IX_primeContacts_homeNumber_Norm | NONCLUSTERED | homeNumber_Normalized | firstName, id, lastName, name | |||
| IX_primeContacts_workNumber_Norm | NONCLUSTERED | workNumber_Normalized | firstName, id, lastName, name | |||
| nci_msft_1_primeContacts_CECAEE79413C1BEC19F0D271FE96F2DF | NONCLUSTERED | addressSuburb | addressLine1, addressLine2, addressPostcode, addressState, contactType, updatedAt |
Relationships (inferred)
Referenced by
Views: dbo.VPrimeEstimatorstagesEstimatorworkflowdb, dbo.vPrimeJobinvoicesObjectivedb, dbo.vPrimeSalesinvoicesObjectivedb
Procedures: dbo.spElevenLabsGetConversationInitialization, dbo.spEthBookingGet, dbo.spEthBookingGetByCode, dbo.spEthBookingGetByID, dbo.spEthBookingGetByJobID, dbo.spEthBookingGetMissingEstimatorLocations, dbo.spEthBookingGetSMSContactDetails, dbo.spEthBookingSMSOnBook, dbo.spEthBookingSMSOnCancel, dbo.spEthBookingSMSOnCreate, dbo.spEthGetAllianzOrChuJobs, dbo.spEthGetBookingEstimatorLocations, dbo.spEthKpiResultsActive, dbo.spEthKpiResultsActiveAll, dbo.spEthKpiResultsbyJobId, dbo.spEthSyncQueueMissingObjects, dbo.spEthSyncQueueMissingObjectsByJobID, dbo.spEthWIPJobClientNoteQueue, dbo.spEthWIPJobEmailGet, dbo.spEthWIPJobEmailQueue, dbo.spEthWIPJobEmailQueueAggregated, dbo.spMakesafeGetAllSharingCodes, dbo.spMakesafeGetPhoneCallTradeByCode, dbo.spMakesafeGetPhoneCallTrades, dbo.spMakesafeGetTrade, dbo.spMakesafeGetTrades, dbo.spMakesafeInsertSMSReply, dbo.spMakeSafePhoneCallRelatedPrimeJobs, dbo.spMakesafeSearchPhoneCallTrades, dbo.spMakesafeUpsertPhoneCallFromPrimeJob, dbo.spMCPGetPrimeJob, dbo.spMCPSearchTrades, dbo.spOptimoRouteGetAppointmentQueue, dbo.spOptimoRouteGetNotScheduledOrders, dbo.spOptimoRouteGetNotScheduledOrdersEmailQueue, dbo.spOptimoRouteGetWorkOrderQueue, dbo.spPrimeBuildLockedEstimatesThisYear, dbo.spPrimeGetContactInformation, dbo.spPrimeGetContactLocationQueue, dbo.spPrimeGetInstructingClientId, dbo.spPrimeGetJobAllocations, dbo.spPrimeGetJobContactRelationships, dbo.spPrimeGetJobInformation, dbo.spPrimeGetJobSummary, dbo.spPrimeGetNextDates_PrimeContacts, dbo.spPrimeGetWIPUpdatesClients, dbo.spPrimeJobSearch, dbo.spPrimeReprocessContactLocation, dbo.spPrimeUpsertContact, dbo.spRefreshEstimatorStageSummary

