Phone Call Schema
Felder
Phone Call Schema
Schema for phone call records including PBX integration data
direction
Call direction
INBOUNDOUTBOUNDcallerNumber
Phone number of the caller
calledNumber
Phone number that was called
callerNumberDigits
Digits-only search key derived from callerNumber (internal)
calledNumberDigits
Digits-only search key derived from calledNumber (internal)
durationSeconds
Total call duration in seconds
partyId
Linked party (customer/contact)
contactPartyId
Linked contact person
handledById
User who handled the call
rungUserIds
Users whose phone rang during this call. Populated for inbound PBX calls (Starface CALLFLOW with CALLED_TYPE=USER) so missed calls show up under "my calls" for everyone whose extension rang, not just the (non-existent) handler.
ticketId
DEPRECATED (ADR 0386) — legacy single ticket link, superseded by `linkedEntities`. No UI ever wrote it; only read by the activity consumer, which now prefers `linkedEntities`.
opportunityId
DEPRECATED (ADR 0386) — legacy single opportunity link, superseded by `linkedEntities`. Still READ (existing calls keep showing their link) and cleared when the user removes that chip, but never written for new links. Do not add new consumers.
linkedEntities
Free-form cross-entity links (ADR 0386). A call is a touchpoint that can concern several records at once — two tickets, a complaint and the opportunity it came from — so this replaces the single-valued `ticketId`/`opportunityId` fields.
entityType
ticketcallback_requestprojectopportunitycomplainttaskassetvehiclecontractpartycoursecampaignnote
Free-text note about the call
contactRating
Manual 1-5 star rating of how the conversation went. Aggregated per contact person on the party detail page.
contactSentiment
Manual tone assessment of the conversation (freundlich / neutral / schwierig)
positiveneutralnegativenullcontactFeedbackNote
Free-text note on the counterpart ("gut erreichbar", "entscheidet nicht selbst"). Kept separate from `note` (what was discussed) so the assessment can be permission-gated later without hiding the call content.
ratedById
Internal user id (`users._id`) who left the assessment
ratedAt
When the assessment was last changed
isCallbackRequested
Whether a callback was requested
startedAt
When the call started (ISO 8601 on the wire; stored as BSON Date)
endedAt
When the call ended (ISO 8601 on the wire; stored as BSON Date)
callerName
Caller name from PBX
calledName
Called party name from PBX
callerAccountId
PBX account ID of the caller (-1 for external)
isConnected
Whether the call was answered
isInternalCall
Whether this was an internal call
isPickup
Whether the call was picked up by another user
externalCallUuid
External PBX call UUID (e.g. Starface CALL_UUID)
source
Source of the call record
manualstarfaceteamsfreeswitchteamsCallId
Microsoft Graph call record ID
teamsCallType
Teams call type: peer-to-peer calling or group meeting
callingmeetingteamsMeetingUrl
Teams meeting join URL (for meeting-type calls)
teamsParticipants
Teams call participants
teamsModalities
Communication modalities used (audio, video, screen share)
callFlow
Detailed call routing steps from PBX
calledType
USERGROUPMODULEUNKNOWNcalledAccountId
pickupFirstName
pickupLastName
pickupAccountId
pickupTime
pickupLoginId
moduleInfo
waitTimeMs
Time the caller waited before pickup or abandonment (INBOUND only)
rawWebhookData
Raw webhook payload for future analysis
bookedAsTimeRecordId
Time record ID created from this call (marks call as booked)
pbxCallId
FreeSWITCH call UUID
sipTrunkId
SIP trunk used
extensionId
Extension that handled the call
queueId
ACD queue if routed through queue
recordingFileId
pbx_recording entity ID
transcriptText
Call transcript from STT
aiSummary
AI-generated call summary
sentimentScore
Sentiment score -1 (negative) to 1 (positive)
Keine Felder passen zum Filter.
Standard-Endpoints
Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:
GET /api/v1/phone_calls— Liste, paginiert + filterbarGET /api/v1/phone_calls/<id>— Einzelne EntityPOST /api/v1/phone_calls— AnlegenPATCH /api/v1/phone_calls/<id>— Teil-UpdateDELETE /api/v1/phone_calls/<id>— Soft-DeleteGET /api/v1/phone_calls/<id>/timeline— Audit + Aktivitäten