Topic 2
Transaction Create - Triggered when a transaction is created. This is not triggered for Top-Up transactions.
Return Type
TransactionResultView {
id?: string;
value: string;
readonly monetaryValue?: number;
saleCurrency: string;
lineItems?: Array<LineItemInsertView>;
couponsUsed?: Array<CouponResultView>;
customerId: string;
customer?: BasicCustomerModel;
transactionType: LoyaleTransactionType;
posId?: string;
posType?: string;
outletId?: string;
outlet?: OutletResultView;
pointValue: number;
allocatedPointValue: number;
cachedResultantPointValue: number;
deleted: boolean;
externalRefId: string;
description: string;
transactionDate: Date;
createdBy?: string;
createdDate?: Date;
updatedBy?: string;
updatedDate?: Date;
schemeId?: string;
scheme?: SchemeResultView;
isSplitted?: boolean;
splittedBetween?: Array<CustomerWithTransactionDetailsResultView>;
isSendPointsAction?: boolean;
targetTransactionId?: string;
sourceTransactionId?: string;
sourceCustomer?: CustomerResultView;
hidden?: boolean;
targetCustomer?: CustomerResultView;
groupId?: string;
levelId: string;
level?: LevelResultView;
}
Sub Return Types
LineItemInsertView {
id?: string
quantity: number($double)
unitPrice?: string
unitPriceNumber: number($double)
description?: string
groupId?: string
}
CouponResultView {
id: string($uuid)
schemeId: string($uuid)
name?: string
description?: string
readOnly valid: boolean
initialNumberOfUses: integer($int32)
from?: Date
to?: Date
until?: Date
imageUrl?: string
updatedDate: Date
createdDate: Date
outletId: Array<string?>
externalReference?: string
platform?: string
isDyanmic: boolean
dynamicDays?: integer($int32)
createdBy?: string
updatedBy?: string
}
BasicCustomerModel{
id?: string
firstName?: string
lastName?: string
email?: string
areaCode?: string
mobileNumber?: string
barCode?: string
externalRefId?: string
onHold: boolean
additionalCustomerFields?: Array<AdditionalCustomerFieldsResultView>
}
OutletResultView {
id: string($uuid)
franchise: OutletFranchiseResultView
franchiseId: string($uuid)
name?: string
coordinate: CoordinateView
address: AddressView
phoneNumber?: string
openingHours: Array<string?>
imageUrl?: string
updatedDate: Date
createdDate: Date
facebook?: string
instagram?: string
type LocationType
webstoreUrl?: string
contactEmail?: string
hidden: boolean
isDefault: boolean
createdBy?: string
updatedBy?: string
}
OutletFranchiseResultView{
id: string($uuid)
name?: string
description?: string
schemeId: string($uuid)
imageUrl?: string
updatedDate: Date
createdDate: Date
hidden: boolean
createdBy?: string
updatedBy?: string
}
SchemeResultView {
id: string($uuid)
name?: string
currency?: string
description?: string
website?: string
color?: string
imageUrl?: string
pointRedemptionPerCurrency: number($double)
updatedDate: Date
createdDate: Date
inLoyale: boolean
hidden: boolean
franchises: Array<FranchiseResultView?>
rounding: Rounding
status: SchemeStatus
plan: Plan
planId: string($uuid)
setupCompleted: boolean
requireTwoFactorAuth: boolean
timezone?: string
origin: SchemeOrigin
}
Plan{
id: string($uuid)
name?: string
rank: integer($int32)
monthlyBasePrice: number($double)
monthlyBasePriceUsd: number($double)
yearlyBasePrice: number($double)
yearlyBasePriceUsd: number($double)
agents: integer($int32)
customers: integer($int32)
pushNotifications: integer($int32)
emails: integer($int32)
sms: integer($int32)
points: boolean
referrals: boolean
coupons: boolean
pointsExpiry: boolean
hidden: boolean
multipleGroups: boolean
multipleBrands: boolean
api: boolean
walletApp: boolean
posApp: boolean
integrations: integer($int32)
sendPoints: boolean
splitTransactions: boolean
createdDate: Date
updatedDate: Date
}
CustomerWithTransactionDetailsResultView {
id?: string
email?: string
firstName?: string
lastName?: string
dob?: Date
gender: Gender
areaCode?: string
mobileNumber?: string
addressLine1?: string
addressLine2?: string
town?: string
state?: string
postCode?: string
country?: string
marketingSub: boolean
barCode?: string
detailedLevels?: Array<CustomerLevelResultView>;
createdDate: Date
updatedDate: Date
lastConnectedDate?: Date
lastTransactionDate?: Date
alerts: Array<string?($uuid)>
profileImageUrl?: string
onHold: boolean
deleted: boolean
emailVerified: boolean
mobileNumberVerified: boolean
pointsFromSplit: number($double)
monetaryFromSplit: number($double)
signUpPlatform?: string
signUpPlatform2: SignUpPlatformView
}
CustomerLevelResultView {
id: string($uuid)
customerId?: string
schemeId: string($uuid)
levelId: string($uuid)
dateJoined: Date
dateLeft?: Date
}
CustomerResultView {
id?: string;
email?: string;
firstName?: string;
readonly name?: string;
lastName?: string;
dob?: Date;
gender?: Gender;
areaCode?: string;
mobileNumber?: string;
addressLine1?: string;
addressLine2?: string;
town?: string;
state?: string;
postCode?: string;
country?: string;
marketingSub?: boolean;
barCode?: string;
detailedLevels?: Array<LegacyCustomerLevelView>;
schemes?: Array<CustomerSchemeResultView>;
createdDate?: Date;
updatedDate?: Date;
lastConnectedDate?: Date;
lastTransactionDate?: Date;
Levels?: Array<CustomerLevelView>;
readonly alerts?: Array<string>;
additionalCustomerFields?: Array<AdditionalCustomerFieldsResultView>;
profileImageUrl?: string;
onHold?: boolean;
deleted?: boolean;
emailVerified?: boolean;
mobileNumberVerified?: boolean;
signUpPlatform?: string;
signUpPlatform2?: SignUpPlatformView;
externalRefId?: string;
parent?: CustomerResultView;
customerDevices?: Array<CustomerDevicesResultView>;
}
LegacyCustomerLevelView{
levelId: string;
tierId: string;
schemeId: string;
createdDate: Date;
updatedDate: Date;
}
CustomerSchemeResultView {
id: string($uuid)
name?: string
currency?: string
description?: string
website?: string
color?: string
imageUrl?: string
pointRedemptionPerCurrency: number($double)
updatedDate: Date
createdDate: Date
inLoyale: boolean
hidden: boolean
rounding: Rounding
billingStatus: SchemeStatus
franchises?: Array<FranchiseResultView>
}
CustomerLevelView {
customerId: string($uuid)
levelId: string($uuid)
}
AdditionalCustomerFieldsResultView {
customerId?: string
createdBy?: string
updatedBy?: string
id?: string($uuid)
schemeId?: string($uuid)
name?: string
key?: string
value?: string
updatedDate: Date
createdDate: Date
internal: boolean
}
SignUpPlatformView {
name?: string
version?: string
device?: string
appName?: string
appVersion?: string
comments?: string
}
CustomerDevicesResultView {
id: string($uuid)
customerId?: string
schemeId: string($uuid)
deviceName?: string
deviceVersion?: string
osName?: string
osVersion?: string
appName?: string
appVersion?: string
comments?: string
firstDevice?: boolean
createdDate: Date
updatedDate: Date
createdBy?: string
updatedBy?: string
}
FranchiseResultView {
id: string($uuid)
name?: string
description?: string
schemeId: string($uuid)
imageUrl?: string
imageGallery?: Array<string>
categoriesIds?: Array<string($uuid)>
categories?: Array<CategoryResultView>
outlets?: Array<FranchiseOutletResultView>
updatedDate: Date
createdDate: Date
hidden: boolean
createdBy?: string
updatedBy?: string
}
CategoryResultView {
id: string($uuid)
name?: string
imageUrl?: string
}
FranchiseOutletResultView {
id: string($uuid)
name?: string
coordinate: CoordinateView
address: AddressView
phoneNumber?: string
openingHours: Array<string?>
imageUrl?: string
updatedDate: Date
createdDate: Date
facebook?: string
instagram?: string
hidden: boolean
createdBy?: string
updatedBy?: string
}
CoordinateView {
latitude: number($double)
longitude: number($double)
}
AddressView {
addressLine1?: string
addressLine2?: string
town?: string
postCode?: string
state?: string
countryId?: string
}
LevelResultView{
id: string
tierId: string
schemeId: string
name?: string
pointAllocationPerCurrency: double
threshold: integer
updatedDate: Date
createdDate: Date
joinByQRCode: boolean
percentageDiscount: double
externalRef?: string
createdBy?: string
updatedBy?: string
}
Note: Gender, Rounding, SchemeStatus, LocationType, SchemeOrigin and LoyaleTransactionType are enums, all enums can be found here.
Updated over 2 years ago
What’s Next