Appearance
dbo.makesafePhoneCall
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.makesafePhoneCall.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | ID | int | no | identity | Primary key, identity. |
| 2 | CallerFullName | nvarchar(255) | yes | Full name of the person who called the make-safe line. | |
| 3 | CallerCompany | nvarchar(255) | yes | Company name given by the caller. | |
| 4 | ClaimNumber | nvarchar(100) | yes | Insurance claim number quoted by the caller. | |
| 5 | CallDateTime | datetime | no | Date and time the make-safe call was received. | |
| 6 | ContactFullName | nvarchar(255) | yes | Full name of the on-site contact for the make-safe job (may differ from the caller). | |
| 7 | ContactPhoneNumber | nvarchar(255) | yes | Phone number of the on-site contact for the make-safe job. | |
| 8 | DamageDescription | nvarchar(MAX) | yes | Description of the property damage reported on the call. | |
| 9 | Message | nvarchar(MAX) | yes | Free-text summary or message captured from the call. | |
| 10 | CallURL | nvarchar(255) | yes | URL to the recorded audio of the call. | |
| 11 | CallerFromPhone | nvarchar(50) | yes | Phone number the call originated from. | |
| 12 | CallerReturnPhone | nvarchar(50) | yes | Phone number provided by the caller for a callback. | |
| 13 | Transcript | nvarchar(MAX) | yes | Full text transcript of the AI-handled call, e.g. from ElevenLabs. | |
| 14 | AssignedUserID | int | yes | FK to makesafeUser.ID identifying the staff member the call is assigned to. | |
| 15 | Status | tinyint | no | Call status code: 0=Active, 80=Closed (No Details), 85=Closed (Testing), 90=Closed (Not a Make Safe Call), 93=Merged, 99=Closed (Site Contacted); values >=70 are considered closed. | |
| 16 | PropertyAddressLatitude | decimal(10,7) | yes | Latitude of the property address. | |
| 17 | PropertyAddressLongitude | decimal(10,7) | yes | Longitude of the property address. | |
| 18 | Source | nvarchar(100) | yes | Channel the call came through (e.g. AI voice line, manual entry). | |
| 19 | PropertyAddress1 | nvarchar(255) | yes | First line of the affected property's street address. | |
| 20 | PropertyAddress2 | nvarchar(255) | yes | Second line of the affected property's street address (e.g. unit/suite). | |
| 21 | PropertySuburb | nvarchar(255) | yes | Suburb of the affected property. | |
| 22 | PropertyState | nvarchar(255) | yes | State/territory of the affected property (e.g. NSW, VIC, QLD). | |
| 23 | PropertyPostCode | nvarchar(10) | yes | Postcode of the affected property. | |
| 24 | PropertyAddress | nvarchar(1037) | yes | computed | Computed, comma-joined full property address built from the individual address fields. |
| 25 | PrimeJobID | uniqueidentifier | yes | FK to primeJobs.id linking the call to a matched Prime Ecosystem job. | |
| 26 | ClientPhone | nvarchar(50) | yes | Phone number of the client/policyholder associated with the call. | |
| 27 | MergedIntoID | int | yes | FK to makesafePhoneCall.ID of the call this record was merged into, if it was a duplicate (Status=93). |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| IX_makesafePhoneCall_Status_AssignedUserID_CallDateTime | NONCLUSTERED | Status, AssignedUserID, CallDateTime | CallerCompany, CallerFullName, ClaimNumber, ContactFullName |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.elevenLabsConversations.PhoneCallID | dbo.makesafePhoneCall.ID | high |
| dbo.makesafePhoneCall.AssignedUserID | dbo.makesafeUser.ID | high |
| dbo.makesafePhoneCallLocation.PhoneCallID | dbo.makesafePhoneCall.ID | medium |
| dbo.makesafePhoneCall.PrimeJobID | dbo.primeJobs.Id | high |
| dbo.makesafeSharingCode.PhoneCallID | dbo.makesafePhoneCall.ID | high |
| dbo.primeAllocations.JobId | dbo.makesafePhoneCall.PrimeJobID | medium |
Referenced by
Views: dbo.vMakeSafePhonecalls, dbo.vMakeSafePhonecallsNoAlerts
Procedures: dbo.spMakesafeGetActivePhoneCalls, dbo.spMakesafeGetAllPhoneCalls, dbo.spMakesafeGetAllSharingCodes, dbo.spMakesafeGetAllUnassignedPhoneCalls, dbo.spMakesafeGetAssignedPhoneCalls, dbo.spMakesafeGetClosedPhoneCalls, dbo.spMakesafeGetGeoLocationPhoneCalls, dbo.spMakesafeGetPhoneCallbyCode, dbo.spMakesafeGetPhoneCallbyID, dbo.spMakesafeGetPhonecallLocationQueue, dbo.spMakesafeGetPhoneCalls, dbo.spMakesafeGetPhoneCallsPaged, dbo.spMakesafeGetPhoneCallStatusbyID, dbo.spMakesafeGetStatsCalls, dbo.spMakesafeGetUnassignedPhoneCallCount, dbo.spMakesafeGetUnassignedPhoneCalls, dbo.spMakesafeGetUserPhoneCalls, dbo.spMakesafeGetUserPhoneCallsCount, dbo.spMakesafeInsertFormPhoneCall, dbo.spMakesafeInsertFormPhoneCallV2, dbo.spMakesafeInsertPhoneCall, dbo.spMakesafeMergePhoneCalls, dbo.spMakesafeQueueEscalationSMSMessagesUnassigned, dbo.spMakesafeQueueOnCallSMSAssignedNotClosed, dbo.spMakesafeQueueOnCallSMSMessagesUnassigned, dbo.spMakesafeQueuePhoneCallSMSMessages, dbo.spMakesafeUpdatePhoneCall, dbo.spMakesafeUpdatePhoneCallAddressGeoData, dbo.spMakesafeUpdatePhoneCallAssignedUserID, dbo.spMakesafeUpdatePhoneCallFromPrimeJob, dbo.spMakesafeUpdatePhoneCallLatLog, dbo.spMakesafeUpdatePhoneCallStatus, dbo.spMakesafeUpsertPhoneCallFromPrimeJob, dbo.spPrimeGetAllocationTypesByPhoneCallID

