Status is an account platform that sits on top of Shopify’s account system to provide a better experience for customers.
Installing the base product is automatic. Some features require minor additional setup, usually covered during onboarding.
On page load, we create an instance of the Status Accounts app and assign it to a global variable (window.StatusAccounts
). This app instance can be used to access information about the app and about the current customer.
App properties become available once the Status Accounts app loads. Utilize our custom event system to detect app initialization and data loading through the status:loaded
event.
if (!window.StatusAccounts?.customer) {
document.addEventListener('status:loaded', (event) => {
console.log(window.StatusAccounts.customer)
});
}
StatusAccounts.element
This is a reference to the Status App element. This is initially null
and will be updated when the app is finished loading.
StatusAccounts.customer
This is an object that contains information about the current customer. For anonymous users, this will be a very limited data set, denoted by a checkmark in the anonymous column.
Key | Type | Description | Anonymous |
---|---|---|---|
id | number | The Shopify customer id | |
firstName | string | null | The customer’s first name |
lastName | string | null | The customer’s last name |
string | The customer’s email | ||
phone | string | null | The customer’s phone |
tags | string[] | A list of tags associated with the customer | |
addresses | object[] | A list of the customer’s addresses | |
recentlyViewedProducts | string[] | A list of Shopify product ids | ✓ |