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

# ReferralEvent

> The schema definition for the ReferralEvent resource.

## Primary key

[Navigate to header](#param-commercial-activity)

document\_id

uuid

default:"Random UUID"

public

required

Unique identifier of the referral event.

## Specific attributes

[Navigate to header](#param-commercial-activity)

event\_type

varchar

public

required

The event type of the referral event.

**Rules**: Max length: 60 characters

[Navigate to header](#param-commercial-activity)

occurred\_at

timestamp

public

required

Timestamp when the referral event was occurred.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

origin

varchar

public

required

The origin of the referral event.

**Rules**: Possible values: cron, customer, odoo, staff, system. Max length: 20 characters

[Navigate to header](#param-commercial-activity)

payload

jsonb

public

The payload of the referral event.

[Navigate to header](#param-commercial-activity)

reason

varchar

public

The reason of the referral event.

**Rules**: Max length: 500 characters

## Foreign keys

[Navigate to header](#param-commercial-activity)

actor\_user

uuid

public

Optional reference to the Users associated with the referral event.

[Navigate to header](#param-commercial-activity)

queue\_event

uuid

public

Optional reference to the Queue Event associated with the referral event. [Ref: Queue Event Schema](https://docs.bbrands.io/schemas/queue/queue-event.md)

[Navigate to header](#param-commercial-activity)

referral

uuid

public

required

Reference to the Referral this referral event belongs to. [Ref: Referral Schema](https://docs.bbrands.io/schemas/referral/referral.md)

[Navigate to header](#param-commercial-activity)

referral\_workflow\_transition

uuid

public

Optional reference to the Referral Workflow Transition associated with the referral event. [Ref: Referral Workflow Transition Schema](https://docs.bbrands.io/schemas/referral/referral-workflow-transition.md)

[Navigate to header](#param-commercial-activity)

step\_from

uuid

public

Optional reference to the Referral Workflow Step associated with the referral event. [Ref: Referral Workflow Step Schema](https://docs.bbrands.io/schemas/referral/referral-workflow-step.md)

[Navigate to header](#param-commercial-activity)

step\_to

uuid

public

Optional reference to the Referral Workflow Step associated with the referral event. [Ref: Referral Workflow Step Schema](https://docs.bbrands.io/schemas/referral/referral-workflow-step.md)

## Tracking attributes

[Navigate to header](#param-commercial-activity)

created\_at

timestamp

public

required

Timestamp when the record was created.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

deleted\_at

timestamp

public

Timestamp when the record was soft-deleted, when applicable.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

is\_actived

boolean

default:"true"

public

required

Indicates whether the record is currently active.

[Navigate to header](#param-commercial-activity)

is\_deleted

boolean

default:"false"

public

required

Indicates whether the record has been soft-deleted.

[Navigate to header](#param-commercial-activity)

updated\_at

timestamp

public

Timestamp when the record was last updated.

**Rules**: Precision: 6, with timezone


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