Object: account
The account object is accessible via the session object, when user has signed in. It is also accessible via various other objects, such as order and enquiry transaction objects.
Variables
.id
Unique ID for the account.
Examples
CODE{{ session.user.account.id }}
OUTPUT1192345
.name
Examples
CODE{{ session.user.account.name }}
OUTPUTJohn Smith
.first_name
The first name of the customer for standard accounts, but could be empty for corporate accounts.
Examples
CODE{{ session.user.account.first_name }}
OUTPUTJohn
.last_name
The last name of the customer for standard accounts, but could be empty for corporate accounts.
Examples
CODE{{ session.user.account.last_name }}
OUTPUTSmith
The primary email address for the account.
Examples
CODE{{ session.user.account.email }}
OUTPUTjohn.smith@gmail.com
.emails
Examples
CODE{% for email in session.user.account.emails.all %}
{{ email.email }}
{% endfor %}
OUTPUTjohn.smith@gmail.com
alt@gmail.com
.phones
Examples
CODE{% for email in session.user.account.phones.all %}
{{ phone.number }}
{% endfor %}
OUTPUT0830000000
0110000000
.type
The type of the account.
Examples
CODE{{ session.user.account.type }}
OUTPUTcustomer
.is_customer
Equivalent to account.type == 'customer'
Examples
CODE{{ session.user.account.is_customer }}
OUTPUT1
.is_admin
Equivalent to account.type == 'admin'
Examples
CODE{{ session.user.account.is_admin }}
OUTPUT1
.tier
Examples
CODE{{ session.user.account.tier }}
OUTPUTRESELLER
.status
Examples
CODE{{ session.user.account.status }}
OUTPUTactive
.orders
Examples
CODE
OUTPUT
.enquiries
Examples
CODE
OUTPUT
.cash_accounts
Examples
CODE
OUTPUT
.billing_addresses
Examples
CODE
OUTPUT
.shipping_addresses
Examples
CODE
OUTPUT
.metadata
Examples
CODE
OUTPUT