Skip to content

Payload branch "delivery"

In this branch You will find every "entity" that can be related to the "delivery aspect" of the current checkout.

Let's review an example:

js
{
  "context": "...",
  "event": "...",
  "checkout_step": "...",
  "attributes": {...},
  "products": [...],
  "carrier": {...},
  "payment": {...},
  "delivery": {
    "country": {
      "id": 10,
      "name": "Italia",
      "iso_code": "IT"
    },
    "address": {
      "firstname": "FABIO",
      "lastname": "POLITI",
      "company": "",
      "address1": "VIA TOLOI",
      "address2": "40",
      "postcode": "00052",
      "city": "CERVETERI",
      "phone": "3471123000",
      "phone_mobile": "3471123000",
      "fax": null,
      "vat_number": "PLTFBA83A14H501I",
      "cf": "PLTFBA83A14H501I",
      "extrainfo": "f.politi@icoa.it",
      "country_name": "Italia",
      "state_name": "Roma"
    },
    "pickup_store": {
      "code": "871",
      "banner": "BS",
      "name": "BLUESPIRIT 871 ROMA TERMINI"
    },
    "is_cnc": true,
    "is_cnc_2h": true,
    "is_b2b": false
  },
  "billing": {...},
  "user": {...},
  "engagements": {...}
}

Variables full details

Here you can find a detailed description of each variable or sub-branch:

VarTypeDescription
countryobjectcountry automatically detected by GEO Ip resolution
addressobject/nullChoosen shipping address (if exists/defined)
pickup_storeobject/nullChoosen pickup store (if exists/defined)

Object: "country"

This object holds informations about the default country automatically detected by GEO Ip resolution, and it is always defined with these variables:

VarTypeDescription
idintUnique country id (cross-tenant)
namestringCountry name (translated)
iso_codestringUnique Country ISO (2)

Object: "address"

This object holds informations about a general "address" (both shipping or billing), and it is always defined with these variables:

VarTypeDescription
firstnamestring/nullAddress's holder firstname (if person)
lastnamestring/nullAddress's holder lastname (if person)
companystring/nullAddress's holder company (if NOT person)
address1stringAddress's part (1)
address2stringAddress's part (2)
postcodestringAddress's postcode/zipcode
citystringAddress's city/location
phonestringAddress's phone
phone_mobilestring/nullAddress's mobile phone
faxstring/nullAddress's fax number
vat_numberstring/nullAddress's VAT number
cfstring/nullAddress holder fiscal code
extrainfostring/nullAddress's additional info
country_namestringAddress's country name (translated)
state_namestringAddress's state/province name (translated)

Object: "pickup_store"

This object holds informations about the pickup shop selected by the User, and it is always defined with these variables:

VarTypeDescription
codestringInternal shop unique code (cross-tenant)
bannerstring/nullInternal shop banner organization (cross-tenant)
namestring/nullShop name

Other variables

VarTypeDescription
is_cncboolClick-n-collect enabled/disabled
is_cnc_2hboolClick-n-collect in 2H enabled/disabled
is_b2bboolThe order has been places by a Shop session (B2B)

Released under the MIT License.