Project schema and data mapping tools
- get_customer_schema: Get the customer identifier schema for a project.
- get_customer_property_schema: Get all customer property definitions for a project.
- get_event_schema: Get every event type tracked in a project and the properties each one carries.
- get_mapping: Get the project's custom mapping to Bloomreach's standard schema.
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
| Name | Type | Required? | Description |
|---|---|---|---|
project_id | str | Yes | The project ID returned by list_projects. |
Response parameters
The tool returns a CustomerSchemaResponse object with the following parameters:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
data | list[CustomerIdField] | Customer identifier fields in declared order. |
error | str | null | Error message if the request failed. |
The CustomerIdField object has the following fields:
| Field | Type | Description |
|---|---|---|
name | str | The identifier's name, for example registered or cookie. |
type | str | Either hard (a primary identifier such as an email) or soft (such as a cookie). |
transform_lowercase | bool | null | Whether values are lowercased when ingested. Null means the option has not been configured. |
transform_trim | bool | null | Whether 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
| Name | Type | Required? | Description |
|---|---|---|---|
project_id | str | Yes | The project ID returned by list_projects. |
Response parameters
The tool returns a CustomerPropertySchemaResponse object with the following parameters:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
properties | list[CustomerPropertyDefinition] | All customer property definitions in the project. |
are_all_used | bool | Whether every defined property has been seen on at least one customer. |
max_customer_properties | int | The maximum number of customer properties allowed in this project. |
error | str | null | Error message if the request failed. |
The CustomerPropertyDefinition object has the following fields:
| Field | Type | Description |
|---|---|---|
property | str | The property's name, for example custom1 or lifetime_value. |
type | str | The data type, for example string, number, or boolean. |
description | str | null | A human-readable description of the property. |
source | str | Either user (defined manually) or data (collected by the SDK). |
used | bool | Whether the property has been observed on at least one customer. |
private | bool | Whether the property is hidden in the UI. |
deleting | bool | Whether the property is queued for deletion. |
example_values | str | null | Example 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
| Name | Type | Required? | Description |
|---|---|---|---|
project_id | str | Yes | The project ID returned by list_projects. |
Response parameters
The tool returns an EventSchemaResponse object with the following parameters:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
events | list[EventDefinition] | All event type definitions in the project. |
default_forbidden | bool | Whether newly tracked event types are forbidden by default. |
default_private | bool | Whether newly tracked event types are private by default. |
error | str | null | Error message if the request failed. |
The EventDefinition object has the following fields:
| Field | Type | Description |
|---|---|---|
type | str | The event type identifier, for example purchase or page_visit. |
name | str | null | A display name override. Often null, in which case use type. |
description | str | null | A human-readable description of what the event represents. |
source | str | Either user (defined manually) or data (collected by the SDK). |
used | bool | Whether the event type has been observed in the project. |
private | bool | null | Whether the event is hidden in the UI. |
forbidden | bool | Whether tracking is blocked for this event type. |
deleting | bool | Whether the event type is queued for deletion. |
real_time_analytics | bool | Whether the event is available in real-time analytics. |
properties | EventPropertySchema | The 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
| Name | Type | Required? | Description |
|---|---|---|---|
project_id | str | Yes | The project ID returned by list_projects. |
Response parameters
The tool returns a MappingResponse object with the following parameters:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
data | CustomMapping | null | The full custom mapping configuration for the project. |
error | str | null | Error message if the request failed. |
The CustomMapping object has the following fields:
| Field | Type | Description |
|---|---|---|
standard_events | StandardEventsMapping | null | Mappings 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_events | list[CustomEventMapping] | Mappings for custom event types that should behave like standard product interaction events. |
customer_properties | CustomerPropertiesMappingSection | null | Mappings from standard attribute names (email, phone, first_name, last_name, gender, birthday, address, and others) to the project's property names. |
catalogs | CatalogsMapping | null | Product catalog references (the main and variant catalog IDs) and the field mappings for the main catalog. |
consents | ConsentsMapping | null | Mappings from standard consent category names (newsletter, sms, email, retargeting, and others) to the project's consent category IDs. |
Updated about 1 hour ago
