API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · phone_calls

Phone Call Schema

Schema-ID
phone_call
Collection
phone_calls
Permissions
  • Lesenphone_call_view
  • Anlegenphone_call_create
  • Ändernphone_call_edit
  • Löschenphone_call_delete

Felder

Phone Call Schema

phone_calls4 Permissions

Schema for phone call records including PBX integration data

directionstringerforderlich

Call direction

INBOUNDOUTBOUND
callerNumberstringerforderlich

Phone number of the caller

calledNumberstringerforderlich

Phone number that was called

callerNumberDigitsstringoptional

Digits-only search key derived from callerNumber (internal)

nullable
calledNumberDigitsstringoptional

Digits-only search key derived from calledNumber (internal)

nullable
durationSecondsnumbererforderlich

Total call duration in seconds

≥ 0
partyIduuidoptional

Linked party (customer/contact)

nullable
contactPartyIduuidoptional

Linked contact person

nullable
handledByIduuidoptional

User who handled the call

nullable
rungUserIdsuuid[]optional

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.

ticketIduuidoptional

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`.

nullable
opportunityIduuidoptional

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.

nullable
linkedEntitiesobject[]optional

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.

Default: []nullable
entityTypestringerforderlich
ticketcallback_requestprojectopportunitycomplainttaskassetvehiclecontractpartycoursecampaign
entityIduuiderforderlich
rolestringerforderlich
notestringoptional

Free-text note about the call

nullable
contactRatingintegeroptional

Manual 1-5 star rating of how the conversation went. Aggregated per contact person on the party detail page.

1 – 5nullable
contactSentimentstringoptional

Manual tone assessment of the conversation (freundlich / neutral / schwierig)

positiveneutralnegativenull
nullable
contactFeedbackNotestringoptional

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.

max 1000 Zeichennullable
ratedByIduuidoptional

Internal user id (`users._id`) who left the assessment

nullable
ratedAtdatetimeoptional

When the assessment was last changed

nullable
isCallbackRequestedbooleanerforderlich

Whether a callback was requested

startedAtdatetimeerforderlich

When the call started (ISO 8601 on the wire; stored as BSON Date)

endedAtdatetimeoptional

When the call ended (ISO 8601 on the wire; stored as BSON Date)

nullable
callerNamestringoptional

Caller name from PBX

nullable
calledNamestringoptional

Called party name from PBX

nullable
callerAccountIdnumberoptional

PBX account ID of the caller (-1 for external)

nullable
isConnectedbooleanerforderlich

Whether the call was answered

isInternalCallbooleanerforderlich

Whether this was an internal call

isPickupbooleanerforderlich

Whether the call was picked up by another user

externalCallUuidstringoptional

External PBX call UUID (e.g. Starface CALL_UUID)

nullable
sourcestringoptional

Source of the call record

manualstarfaceteamsfreeswitch
nullable
teamsCallIdstringoptional

Microsoft Graph call record ID

nullable
teamsCallTypestringoptional

Teams call type: peer-to-peer calling or group meeting

callingmeeting
nullable
teamsMeetingUrlstringoptional

Teams meeting join URL (for meeting-type calls)

nullable
teamsParticipantsobject[]optional

Teams call participants

nullable
displayNamestringerforderlich
userPrincipalNamestringoptional
nullable
microsoftUserIdstringoptional
nullable
internalUserIdstringoptional
nullable
teamsModalitiesstring[]optional

Communication modalities used (audio, video, screen share)

nullable
callFlowobject[]optional

Detailed call routing steps from PBX

nullable
indexintegererforderlich
calledTypestringerforderlich
USERGROUPMODULEUNKNOWN
calledNamestringerforderlich
calledNumberstringerforderlich
calledAccountIdstringoptional
nullable
connectedbooleanerforderlich
forwardTypestringerforderlich
timeStartnumbererforderlich
timeEndnumbererforderlich
pickupbooleanerforderlich
pickupFirstNamestringoptional
nullable
pickupLastNamestringoptional
nullable
pickupAccountIdnumberoptional
nullable
pickupTimenumberoptional
nullable
pickupLoginIdstringoptional
nullable
moduleInfostringoptional
nullable
agentInfoobject[]optional
nullable
accountIdstringerforderlich
onlinebooleanerforderlich
busybooleanerforderlich
dndbooleanerforderlich
ringingbooleanerforderlich
waitTimeMsnumberoptional

Time the caller waited before pickup or abandonment (INBOUND only)

≥ 0nullable
rawWebhookDataobjectoptional

Raw webhook payload for future analysis

nullable
bookedAsTimeRecordIduuidoptional

Time record ID created from this call (marks call as booked)

nullable
pbxCallIdstringoptional

FreeSWITCH call UUID

nullable
sipTrunkIduuidoptional

SIP trunk used

nullable
extensionIduuidoptional

Extension that handled the call

nullable
queueIduuidoptional

ACD queue if routed through queue

nullable
recordingFileIduuidoptional

pbx_recording entity ID

nullable
transcriptTextstringoptional

Call transcript from STT

nullable
aiSummarystringoptional

AI-generated call summary

nullable
sentimentScorenumberoptional

Sentiment score -1 (negative) to 1 (positive)

-1 – 1nullable

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 + filterbar
  • GET /api/v1/phone_calls/<id> — Einzelne Entity
  • POST /api/v1/phone_calls — Anlegen
  • PATCH /api/v1/phone_calls/<id> — Teil-Update
  • DELETE /api/v1/phone_calls/<id> — Soft-Delete
  • GET /api/v1/phone_calls/<id>/timeline — Audit + Aktivitäten

Suche