Cart attributes
Ce contenu n’est pas encore disponible dans votre langue.
A pickup point chosen before checkout travels on the cart as cart attributes. Globe’s cart widget, the hosted selection page and the Storefront pickup API all write the same keys. Checkout and order processing read them, whichever wrote them.
| Key | Value |
|---|---|
globe_PickupPointId | The point’s ID at the carrier, as a string |
globe_PickupPointName | The point’s name |
globe_PickupPointAddress | The point’s address on one line |
globe_PickupPointData | The full point as a JSON string. See below |
globe_DeliveryMethod | pickup |
globe_PickupPointCustomerId | The buyer’s DHL Postnummer for a point that needs one. Otherwise an empty string |
The Storefront pickup API returns all six, ready to write, in each point’s cart_attributes. Write them as they are. Do not build globe_PickupPointData yourself.
globe_PickupPointData
Section titled “globe_PickupPointData”{ "id": "2080-CZ12345", "name": "Trafika U Nádraží", "place": "Trafika U Nádraží", "address": "Nádražní 1, 110 00 Praha", "addressObject": { "street": "Nádražní 1", "city": "Praha", "zip": "11000", "country": "CZ" }, "latitude": 50.09, "longitude": 14.43, "openingHours": [{ "day": 1, "open": "08:00", "close": "18:00" }], "providerShopId": "64aaaaaaaaaaaaaaaaaaaaa1", "provider": "gls", "providerName": "GLS Výdejní místo", "type": "parcelshop", "url": null, "shippingMethods": [ { "name": "GLS Pickup point", "handle": "gls-pickup-point", "matchType": "exact" } ], "countryCode": "CZ"}| Field | Description |
|---|---|
id, name, place, address | The point’s ID, name, place name and one-line address |
addressObject | The address in parts: street, city, zip, country and, for some carriers, more fields |
latitude, longitude | The point’s coordinates |
openingHours | The carrier’s opening hours as Globe stores them. The shape varies by carrier |
providerShopId | Your Globe carrier instance: the id from GET /v1/storefront/carriers |
provider, providerName | The carrier code and the carrier’s display name |
type | The point type, for example parcelshop or locker |
url | The point’s page at the carrier, or null |
shippingMethods | The shipping rates mapped to this carrier for the country: name, handle, matchType, and isCod when you set COD keywords |
countryCode | The point’s country, ISO 3166-1 alpha-2 |
customerId | The DHL Postnummer, only when one was entered |
The JSON can carry more fields. Ignore fields you do not know.
Writing the attributes
Section titled “Writing the attributes”The Storefront API mutation cartAttributesUpdate replaces the cart’s whole attribute list. Read the cart’s attributes first, replace the Globe keys, keep every other key, and write the full list. See Writing to the cart for code.
Home delivery
Section titled “Home delivery”When the buyer switches from a pickup point to home delivery, remove these keys from the list you write:
globe_PickupPointIdglobe_PickupPointNameglobe_PickupPointAddressglobe_PickupPointDataglobe_PickupPointCustomerId
Then set globe_DeliveryMethod:
| Value | Checkout, with the delivery customization on |
|---|---|
home | Hides the pickup point rates |
| Key removed | Shows all rates |
Writing the keys with empty values has the same effect as removing them.
ID-only fallback
Section titled “ID-only fallback”Write the full cart_attributes exactly as the Storefront pickup API returns them. That is the supported contract. The ID-only form below is a fallback for apps that find points some other way, and it works only for some carriers.
Globe also accepts globe_PickupPointId alone. To tell Globe which carrier the ID belongs to, add one of:
| Key | Value |
|---|---|
globe_PickupPointProviderShopId | Your Globe carrier instance ID, the id from GET /v1/storefront/carriers |
globe_PickupPointCarrier | The carrier code, for example packeta |
Without either, Globe uses the carrier the order’s shipping method is mapped to, when there is only one.
Limits of the fallback:
- Only carrier networks Globe stores itself. Globe looks the ID up in the point network it keeps for carriers such as Packeta or Balíkovna. For carriers Globe queries live, such as GLS or DHL, it needs the point’s coordinates to find the point, and an ID alone carries none. Such a claim cannot be verified.
- An unverified ID-only point is not saved. The order gets your unselected tag instead. This also happens when a carrier Globe stores cannot be checked at that moment.
- Checkout cannot use it. Globe’s delivery customization reads
globe_PickupPointDatato filter and rename rates. Do not setglobe_DeliveryMethodtopickupwith only the ID: checkout then hides every pickup rate. Leaveglobe_DeliveryMethodout, so checkout shows all rates and the buyer chooses the rate of the right carrier.
At checkout
Section titled “At checkout”With Checkout delivery customization on in Settings → Cart Widget, checkout reads globe_DeliveryMethod and globe_PickupPointData:
pickupwith point data: only the rates in the point’sshippingMethodsstay visible. If you set up rate renaming, the rate shows the point’s name.pickupwithout point data: the pickup rates are hidden.home: the pickup rates are hidden.- No value: all rates are shown.
If the delivery country in checkout differs from the point’s country, checkout shows all rates.
When the order is created
Section titled “When the order is created”Shopify copies cart attributes to the order. When Globe processes the new order, it reads them and verifies the point with the carrier’s network. This applies to every channel, the theme cart widget included.
Verified. The point exists at the carrier and is active. Globe replaces the point’s name, address and coordinates with the carrier’s data, then saves it on the order:
- the order metafield
Globe.PickupPoint(see Point metafield), - the carrier’s order tags, order attributes and note, as you set them up.
Not saved. Globe saves no point when:
- the carrier does not have the point, or the point is no longer active,
- the point’s carrier is not mapped to the order’s shipping method,
- the point’s country is not the order’s shipping country,
- the order’s shipping method is not a pickup point rate.
The order then gets your Unselected Pickup Point Orders tag (default point_unselected) if you set one, and reminder e-mails follow if you turned them on.
Carrier unreachable. If the carrier cannot answer, Globe keeps the point from the cart’s globe_PickupPointData, as before verification existed.
ID-only claims. A cart with only globe_PickupPointId is saved only when Globe verifies the point. That works for carrier networks Globe stores itself. For carriers Globe queries live, such as GLS or DHL, or when the check fails, the order gets no point and gets your unselected tag. See ID-only fallback.
Labels, CSV exports, Shopify Flow and ERP or WMS integrations see the same fields for these orders as for orders from your online store.