Write journal entries
The journal is the activity log of an entity: notes, calls, emails and meetings. Write to it from your systems, for example when a support ticket is closed or a call is finished.
const { Journal } = sdk.asAdmin().Customers()
await Journal.create(['SC-COMPANY'], {
channel: 'PHONE',
direction: 'INCOMING',
text: 'Customer called about the delayed delivery of order ORD-1012.'
})
The first argument is a list of humanIds. One call writes the same entry to all of them.
Entry fields
| Field | Required | Values |
|---|---|---|
channel | yes | NOTE, PHONE, MOBILE, FAX, EMAIL, CONVERSATION, CALENDAR_EVENT, FILE, JIRA, MAIL |
text | yes | The entry text |
direction | no | UNKNOWN, INCOMING, OUTGOING. Only valid for PHONE, MOBILE, FAX, EMAIL, MAIL |
The response has status 201 and the created journal documents, one per entity.
Author
- With
sdk.asAdmin()the author isSYSTEM. - With
sdk.asUser(idToken)the entry shows the user's display name and avatar.
Examples
Log an email sent by your system
await Journal.create([customerHumanId], {
channel: 'EMAIL',
direction: 'OUTGOING',
text: 'Sent invoice INV-2026-0042 (PDF attached).'
})
Note on a company and its contact person
await Journal.create([companyHumanId, personHumanId], {
channel: 'NOTE',
text: 'Renewed the support contract until 2027-12-31.'
})
Errors
| Error | Cause |
|---|---|
customers/missing-humanIds (SDK) / journal/missing-humanIds | Empty array |
journal/invalid-channel | Unknown channel |
journal/missing-text | No text |
journal/direction-not-supported | direction on a channel that does not support it |
journal/invalid-direction | Unknown direction |
entity/not-found | One of the humanIds does not exist |