The wr.customer Object
title: wr.customer
The wr.customer Object
Available in all custom components, wr.customer is responsible for state tracking and exposing utilities for everything related to the customer.
Whether currently authenticated or not, various states can be read from here via wr.customer.state.
wr.customer.state
This object serves as the bridge between custom components and the app's state regarding customer operations.
In wr.customer.state.cache, you will find:
- cart: All items currently added to the cart.
- customer-wishlist: The user's wishlist. Available only if authenticated.
- customer_addresses_list: The user's address list. Available only if authenticated.
- customer_reviews: The user's reviews. Available only if authenticated.
The core of the cache state revolves around the cart, as other data can be retrieved via invocable methods.
wr.customer.state.cache.cart
The entire shopping cart for the current user is available here.
{
"data": {
"items": [
{
"skuId": "43add257-6334-4f25-b0bd-4db878dd9308",
"priceId": "a4884383-52cc-419a-a605-69fe067f555f",
"quantity": 1,
"originalPrice": 100,
"comparePrice": 0,
"netAmount": 100,
"totalAmount": 100,
"currencyCode": "EUR",
"defaultTaxRate": 0,
"cadence": "once",
"shippingZones": [
{
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"zoneId": "0f27b303-4fa6-4469-948d-61a4f7103a66",
"label": "Zona Italia",
"countryCode": "IT",
"surchargePricing": {},
"taxRate": 22
},
{
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"zoneId": "c19ccb31-5556-4e4f-bc9a-51ff293bc262",
"label": "Zona Francia",
"countryCode": "FR",
"surchargePricing": {
"eur": {
"base": 0,
"percentage": 0
}
},
"taxRate": 20
}
],
"shippingMethods": [
{
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"methodId": "30ba1461-8f03-4586-a850-d69416aeef38",
"label": "Spedizione Standard Italia",
"provider": "Poste Italiane",
"pricing": {
"eur": {
"base": 8,
"perKg": 0.5,
"toWeight": 100000,
"perVolume": 0,
"fromWeight": 10000,
"enableFreeShipping": true,
"freeShippingThreshold": 250
}
},
"availableCountries": [
"IT",
"SM",
"CH"
],
"etaMin": 3,
"etaMax": 7,
"enabled": true,
"maxWeight": 100000,
"maxVolume": 5000000
},
{
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"methodId": "e16fe755-8fce-4c9d-a157-f7e67a6dae9b",
"label": "Spedizione Italiana economica",
"provider": "Provider",
"pricing": {
"eur": {
"base": 10,
"perKg": 0,
"perVolume": 0
}
},
"availableCountries": [
"IT"
],
"etaMin": 1,
"etaMax": 3,
"enabled": true,
"maxWeight": 0,
"maxVolume": 0
},
{
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"methodId": "1758fedd-111f-4b02-973c-5563a5e6a9f1",
"label": "Spedizione Standard Francia",
"provider": "France post",
"pricing": {
"eur": {
"base": 14,
"perKg": 0.85,
"toVolume": 0,
"toWeight": 100000,
"perVolume": 0,
"fromVolume": 0,
"fromWeight": 4000
}
},
"availableCountries": [
"FR"
],
"etaMin": 3,
"etaMax": 14,
"enabled": true,
"maxWeight": 0,
"maxVolume": 0
}
],
"taxZones": [
{
"id": "84f26098-4823-4f3c-82d0-44733e4d9d5d",
"countryCode": "IT",
"rate": 22,
"isDefault": true
},
{
"id": "ebdbe0cb-93c7-4f47-8a51-513828f92b88",
"countryCode": "FR",
"rate": 20,
"isDefault": false
}
],
"available": 9,
"isAvailable": true,
"variantId": "0f669b79-af65-4433-96e3-5eca8e1b8852",
"productId": "d6128604-7b88-4079-9b91-a3a21584376c",
"variantSlug": "copia-di-sbarra-multigrip-a-muro",
"deliveryMethods": [
"shipping",
"pickup"
],
"packageWeight": 18500,
"packageLength": 100,
"packageWidth": 30,
"packageHeight": 30,
"packageVolume": 90000,
"allowBackorder": false,
"purchaseRestock": true,
"allowFreeShipping": true,
"forceFreeShipping": false,
"options": [],
"variantName": "Copia di Sbarra multigrip a muro",
"coverUrl": "https://webrounddev.b-cdn.net/rMa8bmEA2Yg9aYk5PgZPejecmIB2/a7734977-c5b1-49a4-911c-0b0bf745bd4f/commerce/images/1755068526900-9048_2-multigrip-bar-indoor-micacea-1536x1536.jpg",
"id": "3afdc08d-e1e4-4a6d-b683-0c506d984deb"
},
{
"skuId": "01e1c35f-8cb2-4c35-bd8b-1fa42dbc6a8c",
"priceId": "40e112b4-978c-4b31-9652-331260ccf297",
"quantity": 1,
"originalPrice": 17,
"comparePrice": 0,
"netAmount": 17,
"totalAmount": 17,
"currencyCode": "EUR",
"defaultTaxRate": 0,
"cadence": "once",
"shippingZones": [
{
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"zoneId": "0f27b303-4fa6-4469-948d-61a4f7103a66",
"label": "Zona Italia",
"countryCode": "IT",
"surchargePricing": {},
"taxRate": 22
},
{
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"zoneId": "c19ccb31-5556-4e4f-bc9a-51ff293bc262",
"label": "Zona Francia",
"countryCode": "FR",
"surchargePricing": {
"eur": {
"base": 0,
"percentage": 0
}
},
"taxRate": 20
}
],
"shippingMethods": [
{
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"methodId": "e16fe755-8fce-4c9d-a157-f7e67a6dae9b",
"label": "Spedizione Italiana economica",
"provider": "Provider",
"pricing": {
"eur": {
"base": 10,
"perKg": 0,
"perVolume": 0
}
},
"availableCountries": [
"IT"
],
"etaMin": 1,
"etaMax": 3,
"enabled": true,
"maxWeight": 0,
"maxVolume": 0
},
{
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"methodId": "1758fedd-111f-4b02-973c-5563a5e6a9f1",
"label": "Spedizione Standard Francia",
"provider": "France post",
"pricing": {
"eur": {
"base": 14,
"perKg": 0.85,
"toVolume": 0,
"toWeight": 100000,
"perVolume": 0,
"fromVolume": 0,
"fromWeight": 4000
}
},
"availableCountries": [
"FR"
],
"etaMin": 3,
"etaMax": 14,
"enabled": true,
"maxWeight": 0,
"maxVolume": 0
},
{
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"methodId": "30ba1461-8f03-4586-a850-d69416aeef38",
"label": "Spedizione Standard Italia",
"provider": "Poste Italiane",
"pricing": {
"eur": {
"base": 8,
"perKg": 0.5,
"toWeight": 100000,
"perVolume": 0,
"fromWeight": 10000,
"enableFreeShipping": true,
"freeShippingThreshold": 250
}
},
"availableCountries": [
"IT",
"SM",
"CH"
],
"etaMin": 3,
"etaMax": 7,
"enabled": true,
"maxWeight": 100000,
"maxVolume": 5000000
}
],
"taxZones": [
{
"id": "84f26098-4823-4f3c-82d0-44733e4d9d5d",
"countryCode": "IT",
"rate": 22,
"isDefault": true
},
{
"id": "ebdbe0cb-93c7-4f47-8a51-513828f92b88",
"countryCode": "FR",
"rate": 20,
"isDefault": false
}
],
"available": 14,
"isAvailable": true,
"variantId": "1057deeb-024f-4a5b-9365-a3131aeb7826",
"productId": "5aa07d67-33e0-459c-ba9d-86b68d202e18",
"variantSlug": "cappellino-nero",
"deliveryMethods": [
"shipping"
],
"packageWeight": 200,
"allowBackorder": false,
"purchaseRestock": true,
"allowFreeShipping": true,
"forceFreeShipping": false,
"options": [],
"variantName": "Cappellino nero",
"coverUrl": "https://webrounddev.b-cdn.net/rMa8bmEA2Yg9aYk5PgZPejecmIB2/a7734977-c5b1-49a4-911c-0b0bf745bd4f/commerce/images/1765018321978-Solid-Black-Baseball-Cap-Hat-with-Adjustable-Buckle-Back-Unisex_2b2bd9e5-d9df-4432-89e6-e22570e2de9e.bd72dfea18cccbcce241cbf7d35226c5.avif",
"id": "a916442b-3157-4249-9972-866120c37970"
}
],
"totalAmount": 117
}
}
wr.customer.state.cache.customer
This object stores the data of the authenticated user.
Example:
{
"id": "00e72027-3672-4c12-a78f-e9ff744a0892",
"email": "[email protected]",
"displayName": "Nome Cognome",
"emailVerified": true,
"provider": "password",
"createdAt": "2025-11-24T14:16:04.670Z",
"twoFactorEnabled": true,
"vatExempt": false,
"vatCode": "",
"newsletter": true
}