> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revenuebee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# communications.log

> An email, call, message or meeting from another tool.

Support tickets, emails or calls that happened outside the CRM, so the assistant sees the whole history.

```ts theme={null}
const [communication, error] = await crm.communications.log({
  partyId: contact.id,
  type: "email",
  direction: "inbound",
  subject: ticket.subject,
  body: ticket.body,
  occurredAt: ticket.createdAt,
  externalId: ticket.id,
});
```

**partyId** `string` *required*

The CRM's id for the customer, from [`contacts.upsert`](https://docs.revenuebee.ai/sdk/upsert-contact) or
[`contacts.resolve`](https://docs.revenuebee.ai/sdk/resolve-contact).

**type** `string` *required*

One of `call`, `email`, `sms`, `whatsapp`, `meeting`, `chat`.

**direction** `string` *required*

`inbound`, `outbound` or `internal`.

**externalId** `string`

Your id for it. Sending the same one again returns the first instead of logging it twice.

**occurredAt** `string`

ISO 8601. Now when omitted.

**subject** `string`

**body** `string`

**durationSeconds** `number`

For a call or a meeting.

**fromEmail** `string`

**toEmail** `string`

**fromNumber** `string`

**toNumber** `string`

**gist** `string`

A line on what it was about.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.