For the complete documentation index, see llms.txt. This page is also available as Markdown.

Segments

Segment definitions and statistics, exported daily as a delta file.

The Segments file contains the segments defined in Open Loyalty and their latest calculated statistics.

Delta export. Each daily file contains the segments that were created or updated during that UTC day, including a recalculation of the segment. Upsert on segmentId and keep the row with the latest updatedAt.

File: analytics/Segments/segments_YYYY_MM_DD.csv Primary key: segmentId

Available data (in column order):

Column
Type
Empty value
Description

segmentId

uuid

No

Unique ID of the segment

storeId

uuid

No

ID of the tenant where the segment was created

name

string

Yes

Name of the segment

active

boolean

No

Uses the text true or false

description

string

Yes

Description of the segment

calculatedAt

datetime

Yes

Date when membership was last calculated

customersCount

integer

No

Number of members at the last calculation

averageTransactionAmount

decimal

No

Average transaction value

averageTransactions

decimal

No

Average transactions per member

averageClv

decimal

No

Average customer lifetime value

updatedAt

datetime

No

Date when the segment was last updated

createdAt

datetime

No

Date when the segment was created

Which members belong to which segment is exported separately. See Members Segments.

Last updated

Was this helpful?