Customer profiles and event history tools

list_customers

Searches for customers in a project and returns matching records. Each result has an internal ID and a dictionary of identifier values keyed by field name, for example {'registered': '[email protected]', 'cookie': '...'}. The query parameter searches across identifier values such as email address or cookie ID. It does not search property values.

Pagination is controlled with skip and count; together they must not exceed 1,000. Identifier values marked as private are masked to '******' when the session does not have the administration.pii.flag permission. The masking is enforced on the server and cannot be overridden from the tool.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.
querystrNoText to search across customer identifier values. Defaults to an empty string.
skipintNoPagination offset. Defaults to 0. skip plus count must not exceed 1,000.
countintNoNumber of results to return. Defaults to 20. Maximum 1,000.

Response parameters

The tool returns a CustomersResponse object with the following parameters:

ParameterTypeDescription
datalist[Customer]The matching customer records.
evaluation_statsany | nullQuery evaluation statistics, when available.
limitintThe maximum number of results requested.
matchedintThe number of customers matched by the filter.
matched_exactlyintThe number matched exactly, not fuzzy.
matched_limitedboolWhether the match count was capped by a server limit. The true total may be higher.
skipintThe pagination offset that was applied.
totalintThe total number of customers in the project.

The Customer object has the following fields:

FieldTypeDescription
idstrThe internal customer ID. Use this as customer_id in other tools.
idsdict[str, any | null]Identifier values keyed by field name, for example {'registered': '[email protected]', 'cookie': '...'}.

get_customer_properties

Returns every property currently set on a single customer, along with each property's last update timestamp. The response also includes the customer's expression-derived computed attributes. Property values marked as private are masked to '******' when the session does not have the administration.pii.flag permission.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.
customer_idstrYesThe internal customer ID returned by list_customers.

Response parameters

The tool returns a CustomerPropertiesResponse object with the following parameters:

ParameterTypeDescription
idstrThe internal customer ID.
company_idstrThe project ID this customer belongs to.
createdintUnix timestamp of when the customer record was created.
idsdict[str, str | null]Identifier values keyed by field name.
propertiesdict[str, CustomerProperty]Property values keyed by name. Each entry has a value and a last_update.
attributeslist[any]Expression-derived computed attribute values for this customer.
failed_attributeslist[any]Expressions that failed to evaluate for this customer.
export_archived_eventsboolWhether archived events are included when this customer is exported.

list_customer_events

Lists events for a single customer, with an optional filter by event type. Events are returned in reverse chronological order by default. Each event has a type (such as purchase or session_start), a Unix timestamp, and a properties dictionary with event-specific data. The date range is fixed to the last 365 days.

Event property values marked as private are masked to '******' when the session does not have the administration.pii.flag permission.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.
customer_idstrYesThe internal customer ID returned by list_customers.
event_typeslist[str] | nullNoEvent types to include, for example ['purchase', 'page_visit']. Omit to return all event types.
skipintNoPagination offset. Defaults to 0.
limitintNoNumber of events to return. Defaults to 50. Maximum 500.
order_directionstrNodesc (most recent first, default) or asc (oldest first).

Response parameters

The tool returns a CustomerEventsResponse object with the following parameters:

ParameterTypeDescription
datalist[CustomerEvent]The events that matched the filters.
totalintThe total number of events matching the filters before pagination.
limitintThe maximum number of events requested.
skipintThe pagination offset that was applied.

The CustomerEvent object has the following fields:

FieldTypeDescription
typestrThe event type identifier, for example purchase or page_visit.
timestampfloatUnix timestamp of when the event occurred.
propertiesdict[str, any]Event property values keyed by property name.

list_customers_in_segment

Lists customers who belong to a specific named segment inside a segmentation. The segment name must match exactly. If the name is not found, the tool returns an error that lists the segment names that do exist.

Pagination is controlled with skip and count; together they must not exceed 1,000. Identifier values marked as private are masked to '******' when the session does not have the administration.pii.flag permission.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.
segmentation_idstrYesThe segmentation ID returned by list_segmentations.
segment_namestrYesThe exact name of the segment to filter by, for example At-Risk.
skipintNoPagination offset. Defaults to 0. skip plus count must not exceed 1,000.
countintNoNumber of results to return. Defaults to 20. Maximum 1,000.

Response parameters

The tool returns a CustomersResponse object with the following parameters:

ParameterTypeDescription
datalist[Customer]The matching customer records.
evaluation_statsany | nullQuery evaluation statistics, when available.
limitintThe maximum number of results requested.
matchedintThe number of customers matched by the segment filter.
matched_exactlyintThe number matched exactly, not fuzzy.
matched_limitedboolWhether the match count was capped by a server limit. The true total may be higher.
skipintThe pagination offset that was applied.
totalintThe total number of customers in the project.

The Customer object has the following fields:

FieldTypeDescription
idstrThe internal customer ID.
idsdict[str, any | null]Identifier values keyed by field name, for example {'registered': '[email protected]', 'cookie': '...'}.


© Bloomreach, Inc. All rights reserved.