Customers - aareano/ifshop-wiki GitHub Wiki
The Customer event class contains the following events:
- a customer is created
- a customer is disabled
- a customer is enabled
- a customer is updated
- a customer is deleted
The customer
drop is the root drop that's defined for this class. Below is an example of the tree of liquid drops available to you.
Example Usage: To access the price of the first shipping method of the last order of the customer, you would use customer.last_order.shipping_methods[0].price
.
customer
├── customer_address
├── customer_default_address
├── order
│ ├── billing_address
│ ├── discount
│ ├── fulfillment
│ │ └── fulfillment_line_item
│ │ └── line_item
│ │ ├── product
│ │ │ ├── collection
│ │ │ ├── image
│ │ │ ├── image
│ │ │ ├── product_option
│ │ │ └── product_option
│ │ └── variant
│ │ └── image
│ ├── fulfillment
│ │ └── fulfillment_line_item
│ │ └── line_item
│ │ ├── product
│ │ │ ├── collection
│ │ │ ├── image
│ │ │ ├── product_option
│ │ │ └── product_option
│ │ └── variant
│ │ └── image
│ ├── line_item
│ │ ├── product
│ │ │ ├── collection
│ │ │ ├── image
│ │ │ ├── image
│ │ │ ├── image
│ │ │ ├── product_option
│ │ │ └── product_option
│ │ └── variant
│ │ └── image
│ ├── tax_line
│ ├── transaction
│ │ ├── payment_details
│ │ └── receipt
│ ├── transaction
│ │ └── receipt
│ ├── shipping_address
│ └── shipping_method
└── shop
└── collection
The tree is representative of what you can expect for the following events:
- a customer is created
- a customer is disabled
- a customer is enabled
- a customer is updated
The remaining customer event has limited data availability because Shopify deletes the data immediately, before ifshop has access to it:
- a customer is deleted
Note: This tree is an illustrative, but not exhaustive - in theory, it goes on forever! - demonstration of the assemblage and structure of the data available to you.
Warning: The tree of liquid drops you encounter in practice will almost certainly have different dimensions than this. This is merely an example to show structure.