Project schema and data mapping tools

get_customer_schema

Returns the ordered list of identifier fields the project uses to identify customers, for example registered, cookie, email_id, or shopify_id. Each field is either a hard identifier (a permanent ID such as a registered email) or a soft identifier (such as a browser cookie). The order of fields matches the order of identifier values returned by list_customers.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.

Response parameters

The tool returns a CustomerSchemaResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomerIdField]Customer identifier fields in declared order.
errorstr | nullError message if the request failed.

The CustomerIdField object has the following fields:

FieldTypeDescription
namestrThe identifier's name, for example registered or cookie.
typestrEither hard (a primary identifier such as an email) or soft (such as a cookie).
transform_lowercasebool | nullWhether values are lowercased when ingested. Null means the option has not been configured.
transform_trimbool | nullWhether values are trimmed when ingested. Null means the option has not been configured.

get_customer_property_schema

Returns every customer property defined in the project, along with its data type, description, source, and whether it has been observed on a real customer yet. Source is either user (a property someone defined manually) or data (a property the SDK collects automatically). Properties from all groups are included.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.

Response parameters

The tool returns a CustomerPropertySchemaResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
propertieslist[CustomerPropertyDefinition]All customer property definitions in the project.
are_all_usedboolWhether every defined property has been seen on at least one customer.
max_customer_propertiesintThe maximum number of customer properties allowed in this project.
errorstr | nullError message if the request failed.

The CustomerPropertyDefinition object has the following fields:

FieldTypeDescription
propertystrThe property's name, for example custom1 or lifetime_value.
typestrThe data type, for example string, number, or boolean.
descriptionstr | nullA human-readable description of the property.
sourcestrEither user (defined manually) or data (collected by the SDK).
usedboolWhether the property has been observed on at least one customer.
privateboolWhether the property is hidden in the UI.
deletingboolWhether the property is queued for deletion.
example_valuesstr | nullExample values for the property.

get_event_schema

Returns every event type the project tracks. Use the type field as the event identifier, for example purchase, session_start, page_visit, or cart_update. Each event includes its own property schema. Events from all groups are included.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.

Response parameters

The tool returns an EventSchemaResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
eventslist[EventDefinition]All event type definitions in the project.
default_forbiddenboolWhether newly tracked event types are forbidden by default.
default_privateboolWhether newly tracked event types are private by default.
errorstr | nullError message if the request failed.

The EventDefinition object has the following fields:

FieldTypeDescription
typestrThe event type identifier, for example purchase or page_visit.
namestr | nullA display name override. Often null, in which case use type.
descriptionstr | nullA human-readable description of what the event represents.
sourcestrEither user (defined manually) or data (collected by the SDK).
usedboolWhether the event type has been observed in the project.
privatebool | nullWhether the event is hidden in the UI.
forbiddenboolWhether tracking is blocked for this event type.
deletingboolWhether the event type is queued for deletion.
real_time_analyticsboolWhether the event is available in real-time analytics.
propertiesEventPropertySchemaThe property schema for this event type.

get_mapping

Returns the project's custom mapping to Bloomreach's standard schema. This mapping wires the project's tracked events and properties to the names Bloomreach features expect: the twelve standard e-commerce events (such as purchase and add_to_cart), standard customer attribute fields (such as email and phone), product catalog references with column-level field mappings, and consent category bindings.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.

Response parameters

The tool returns a MappingResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataCustomMapping | nullThe full custom mapping configuration for the project.
errorstr | nullError message if the request failed.

The CustomMapping object has the following fields:

FieldTypeDescription
standard_eventsStandardEventsMapping | nullMappings for the standard e-commerce events: purchase, returned_purchase, purchase_item, add_to_cart, remove_from_cart, view_item, view_category, return_item, search, add_to_wishlist, remove_from_wishlist, and checkout. Each entry maps a tracked event type and its product or price attributes.
custom_eventslist[CustomEventMapping]Mappings for custom event types that should behave like standard product interaction events.
customer_propertiesCustomerPropertiesMappingSection | nullMappings from standard attribute names (email, phone, first_name, last_name, gender, birthday, address, and others) to the project's property names.
catalogsCatalogsMapping | nullProduct catalog references (the main and variant catalog IDs) and the field mappings for the main catalog.
consentsConsentsMapping | nullMappings from standard consent category names (newsletter, sms, email, retargeting, and others) to the project's consent category IDs.


© Bloomreach, Inc. All rights reserved.