onCustomerBanned

Purpose

Triggered when a customer is banned from a shop. Use this hook to log bans and integrate with MDT/admin systems.

When It Triggers

  • Owner or authorized employee bans a customer

  • Ban is saved to the database

Parameters

Parameter
Type
Description

data.source

number

Server ID of who banned

data.shopId

string

Unique shop identifier

data.shopName

string

Display name of the shop

data.customerIdentifier

string

Banned customer's identifier

data.customerName

string

Banned customer's name

data.banReason

string

Reason for ban

data.showReasonToCustomer

boolean

Whether reason is shown to customer

data.bannedBy

string

Name of person who banned

data.bannedByIdentifier

string

Identifier of person who banned

data.customerHistory

table

Customer's history at this shop

data.customerHistory.totalSpent

number

Total money spent

data.customerHistory.totalPurchases

number

Total number of purchases

data.customerHistory.loyaltyPoints

number

Loyalty points at time of ban

data.customerHistory.firstVisit

string

First visit date

data.customerHistory.lastVisit

string

Last visit date

data.timestamp

number

Server timestamp

Example

Last updated