Customer
Categories:
Customer Table Fields
ViewAdd a Customer Record
POST /customer/customer
This endpoint adds a new customer record to EPASS. When adding a customer record, you can specify a branch and terminal to add them to (see the Samples section at the end of this topic).
Payload
Required Fields
The following fields are the absolute minimum fields that are required to add a customer record.
Field | Type | Description |
---|---|---|
BranchCode |
string | Must be a valid Branch Code. This Branch must also be set up in A/R Variables (if Split A/R By Branch is turned on). If not provided then it uses the constant value DEFAULT . |
Code |
string | The customer code can be a maximum of 20 characters. We recommend using the customer phone number without any dashes, slashes, or spaces. EPASS auto-generates a code if you do not supply one. |
FirstName |
string | Required |
LastName |
string | Required |
TaxCode |
string | Required and recommended that you provide a TaxCode. However, if not supplied, it will attempt to default from the Terminal object. |
Potentially Required Fields
These fields may be required, depending on your EPASS configuration.
Field | Type | Value |
---|---|---|
Address1 |
string | If the A/R Variables option RequireAddress is True, then it’s required. |
BillingEmail |
string | Must be a valid email format. |
City |
string | If the A/R Variables option RequireCity is True, then it’s required. |
CustomerDepartment |
array | If the A/R Variables option RequireZone is True, then must have valid Department and MapZone |
Directions |
string | If the A/R Variables option RequireDirections is True, then it’s required. |
Email |
string | If the A/R Variables option RequiteEmail is True, then either email must be a valid formatted email or DeclineEmail must be True. |
MailingEmail |
string | Must be a valid email format. |
MapZoneCode |
string | Must be a valid Map Zone Code. |
Phone1 |
string | If the A/R Variables option Phone1Required is True, then it’s required. |
ZipCode |
string | If the A/R Variables option RequireZip is True, then it’s required. Must be valid Zip Code or Postal Code format. |
Fields with Initialized Values
These fields are initialized to a default value.
Field | Value |
---|---|
AccountType |
This will default from A/R Variables (for the current Branch) field: AccType |
BillServiceCharge |
This will default from A/R Variables (for the current Branch) field: AccServiceCharges |
CreditLimit |
This will default from A/R Variables (for the current Branch) field: AccDefaultCreditLimit |
DoNotAllowSaveCreditCard |
False |
DoNotMMS |
False |
DoNotService |
False |
DoNotText |
False |
EnableCreditLimit |
This will default from A/R Variables (for the current Branch) field: AccEnableCreditLimit |
ExternalID |
Not required but if provided it must be a unique value. |
InvoiceDeliveryMethod |
This will default from A/R Variables (for the current Branch) field: InvoiceDeliveryMethod |
ItemListPriceCode |
This will default from A/R Variables (for the current Branch) field: AccItemListPriceCode |
LaborRate |
This will default from A/R Variables (for the current Branch) field: AccLaborRate |
OtherListPriceCode |
This will default from A/R Variables (for the current Branch) field: AccOtherListPriceCode |
PaymentTypeCode |
If you do not supply a PaymentTypeCode and if the A/R Variables option DefaultCustomerPaymentTypeFromTerminal is True then it will use the PaymentTypeCode from the Terminal object. |
PORequired |
False |
PreferredContact |
This will default from A/R Variables (for the current Branch) field: PreferredContact |
PrintStatement |
This will default from A/R Variables (for the current Branch) field: AccPrintStatements |
SerialListPriceCode |
This will default from A/R Variables (for the current Branch) field: AccSerialListPrice |
Statement |
Print Only |
UseProjectPricing |
False |
UserCreated |
If you do not supply the UserCreated then the LoginUser will be used. |
WebCarrierCode |
This will default from A/R Variables (for the current Branch) field: CarrierCode |
Sample: Adding a Customer Record
POST /customer/customer
{
"externalID": "",
"code": null,
"lastName": "Michael",
"firstName": "Bluster",
"address1": "1111 Main street",
"address2": null,
"city": "Burnaby",
"state": "BC",
"zipCode": "V4W 0Y2",
"country": null,
"phone1TextEnabled": false,
"phone2TextEnabled": false,
"phone1": null,
"phone2": null,
"businessPhoneTextEnabled": false,
"businessPhone": null,
"faxTextEnabled": false,
"fax": null,
"otherPhone": null,
"email": "test@test.com",
"billingEmail": null,
"website": null,
"contact": [],
"mailingSameAsPhysical": false,
"mailingAddress1": "222 Main street",
"mailingAddress2": null,
"mailingCity": "Vancovuer",
"mailingState": "BC",
"mailingZipCode": null,
"mailingPhone": null,
"mailingFax": null,
"mailingEmail": "test@test.com",
"customerDepartment": [],
"directions": null,
"note": null,
"poNumber": null,
"branchCode": null,
"tax2Exempt": null,
"tax3Exempt": null,
"taxCode": null,
"updateContactInfo": true,
"contacts": [
{
"name": "contact1",
"description": "description1",
"phone": "phone1",
"email": "email1@hotmail.com"
},
{
"name": "contact2",
"description": "description2",
"phone": "phone2",
"email": "email2@hotmail.com"
},
{
"name": "contact3",
"description": "description3",
"phone": "phone3",
"email": "email3@hotmail.com"
},
{
"name": "contact4",
"description": "description4",
"phone": "phone4",
"email": "email4@hotmail.com"
},
{
"name": "contact5",
"description": "description5",
"phone": "phone5",
"email": "email5@hotmail.com"
},
{
"name": "contact6",
"description": "description6",
"phone": "phone6",
"email": "email6@hotmail.com"
}
],
"customerDepartments": [
{
"department": "VANCOUVER",
"mapZoneCode": "VANIS"
},
{
"department": "KELOWNA",
"mapZoneCode": "KEL"
}
]
}
{
"success": true,
"warning": false,
"httpStatusCode": 201,
"generalMessage": null,
"exceptionMessage": null,
"keys": [
{
"table": "Customer",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 354308
}
]
},
{
"key": "PrimaryKey",
"fields": [
{
"fieldName": "Code",
"fieldValue": "191408"
}
]
}
]
},
{
"table": "CustomerContact",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 140192
}
]
}
]
},
{
"table": "CustomerDepartment",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 531
}
]
}
]
},
{
"table": "CustomerDepartment",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 532
}
]
}
]
}
],
"messages": [],
"warnings": []
}
{
"success": false,
"warning": false,
"httpStatusCode": 422,
"generalMessage": "One or more of the fields has an invalid or missing value.",
"exceptionMessage": null,
"keys": [],
"messages": [
{
"code": "CUS-00004",
"message": "FirstName and LastName are required."
},
{
"code": "CUS-10028",
"message": "AddressLine1 is missing."
},
{
"code": "CUS-10029",
"message": "City is missing."
},
{
"code": "CUS-10030",
"message": "ZipCode is missing."
},
{
"code": "CUS-10039",
"message": "Email address is missing."
}
],
"warnings": []
}
Retrieve a Customer Record
GET /customer/customer
This endpoint returns the attributes of a customer record.
Parameters
Name | Description |
---|---|
CustomerCode |
Required. The customer code. In EPASS, this is entered in the Account # field of a customer’s record and has a maximum of 20 characters. |
Sample: Retrieving a Customer Record
GET /customer/customer?CustomerCode=1000
{
"Result": {
"Success": true,
"Warning": false,
"HttpStatusCode": 0,
"GeneralMessage": "Returned 1 record",
"ExceptionMessage": null,
"Keys": [],
"Messages": [],
"Warnings": []
},
"Values": [
{
"Fields": {
"ID": 157946,
"Code": "1000",
"ExternalID": "",
"FirstName": "Ben",
"LastName": "Kenobi",
"Suite": "",
"Address1": "1510 Dune Sea Drive.",
"Address2": "",
"City": "Mos Eisley",
"State": "TA",
"AccountType": "Open Item",
"AllowCharge": false,
"AveragePaymentDays": 0,
"Balance": 0.0,
"BillServiceCharge": true,
"BillToAccount": "",
"BirthDate": null,
"BranchCode": "310",
"BusinessPhone": "",
"Contact": "",
"CreditLimit": 0.0,
"DateCreated": "2018-02-21T00:00:00",
"DateModified": null,
"Dependants": 0,
"Directions": "",
"DoNotMail": false,
"Email": "",
"EmpAddress1": "",
"EmpAddress2": "",
"EmpAltIncome": 0.0,
"EmpAltIncomeDesc": "",
"EmpCity": "",
"EmpOccupation": "",
"EmpSalary": 0.0,
"EmpStartDate": null,
"EmpState": "",
"EmpZipCode": "",
"Employer": "",
"EnableCreditLimit": false,
"ExpiryDate": null,
"Extensions": 0,
"Fax": "",
"Field1": "",
"Field2": "",
"Field3": "",
"Field4": "",
"Field5": "",
"FinanceCompany": false,
"FinanceDocument": "",
"ItemListPriceCode": "CSP",
"LaborRate": "Rate 1",
"LastActivityDate": "2018-02-21T00:00:00",
"LastYearPurchase": 0.0,
"Longitude": 0.0,
"Latitude": 0.0,
"MapReference": "",
"MapZoneCode": "",
"MaritalStatus": "",
"MiddleName": "",
"Note": "",
"OtherListPriceCode": "CSP",
"OtherPhone": "",
"Overdue": 0,
"Overdue30": 0,
"Overdue60": 0,
"Overdue90": 0,
"PONumber": "",
"PORequired": false,
"Phone1": "",
"Phone2": "(306) 955-1684",
"PrintStatement": true,
"SSN": "",
"SerialListPriceCode": "CSP",
"ShowInvoicesHyperlink": true,
"Statement": "Print Only",
"Tax1Exempt": "",
"Tax2Exempt": "",
"Tax3Exempt": "",
"TaxCode": "SKP",
"ThirtyDayAccount": false,
"UserCreated": "03082",
"UserModified": "",
"Website": "",
"YTDPurchase": 442.89,
"ZipCode": "S7J 0G4",
"BankruptCode": "",
"CreditHold": false,
"WebNotShowRef": false,
"WebNotShowPastDueWarn": false,
"DoNotEmail": false,
"BillingEmail": "",
"InvoiceDeliveryMethod": "Print",
"WebViewPartsLookup": true,
"WebViewCurrentOrders": true,
"WebViewOpenPartsList": true,
"WebViewHistory": true,
"WebAccessType": "Retail",
"WebPassword2": "",
"WebCarrierCode": "",
"GoogleValidated": false,
"Phone1TextEnabled": false,
"Phone2TextEnabled": false,
"BusinessPhoneTextEnabled": false,
"FaxTextEnabled": false,
"WebAllowSearchAll": false,
"WebMessageUserCode": "",
"WebMessageRecUserCode": "",
"DoNotText": false,
"DoNotMMS": false,
"PreferredContact": "",
"WebSubmitClaim1Year": false,
"WebSubmitClaimSub": false,
"WebSubmitClaimWolf": false,
"WebReturnParts": false,
"UpdateContactInfo": false,
"SynchInMobileTech": false,
"WebLanguage": "English",
"SalespersonCode": "",
"CreditManagerUserCode": "",
"CreditHoldDays": 0,
"ForceCreditApproval": false,
"DoNotAllowSaveCreditCard": false,
"UseProjectPricing": false,
"ProjectCode": "",
"SaleReferralCode": "",
"Country": "",
"DeclineEmail": false,
"ParentCompanyCode": "",
"Table1Code": "",
"DoNotService": false,
"EmpAltSupervisor": "",
"EmpExt": "",
"EmpFromTime": "",
"EmpPayday": "",
"EmpPhone1": "",
"EmpSupervisor": "",
"EmpToTime": "",
"InvTypeCode": "",
"MailingAddress1": "",
"MailingAddress2": "",
"MailingCity": "",
"MailingEmail": "",
"MailingFax": "",
"MailingPhone": "",
"MailingSameAsPhysical": true,
"MailingState": "",
"MailingZipCode": "",
"PaymentTypeCode": "COD",
"WebChargeShipping": true,
"WebDefaultLocation": "",
"WebID": "",
"WebPassword": "",
"WebShipPreference": "Complete Ship"
}
}
]
}
Customer not found.
Search for a Customer
POST /customer/search
This endpoint searches and returns a customer record. You can search for a customer by any of it’s attributes.
Note
See Searching, Paging, and Extended Info for instructions on building search queries.Sample: Searching for a Customer
POST /customer/search
{
"query": {
"fieldName": "ID",
"eval": "EQUAL",
"value": "301762"
}
}
POST /customer/search
{
"query": {
"fieldName": "ID",
"eval": "EQUAL",
"value": "303428"
},
"extendedInfo": {
"Branch": [
"ID",
"Code",
"Description"
]
}
}
POST /customer/search
{
"paging": {
"pageSize": 5,
"pageStartId": 0
},
"query": {
"fieldName": "code",
"eval": "between",
"start": "1",
"end":"150"
},
"subquery":[
{
"logic": "and",
"query": {
"fieldName": "CITY",
"eval": "IN",
"valueList": ["vancouver","calgary","burnaby"]
},
"subquery":[
{
"logic": "or",
"query": {
"fieldName": "LastYearPurchase",
"eval": "greaterthan",
"value": "0"
}
}
]
},
{
"logic": "or",
"query": {
"fieldName": "datecreated",
"eval": "between",
"start": "10/10/2020",
"end":"10/10/2021"
},
"subquery":[
{
"logic": "and",
"query": {
"fieldName": "code",
"eval": "like",
"value": "A"
}
}
]
},
{
"logic": "and",
"query": {
"fieldName": "email",
"eval": "equal",
"value": "john@realizestrategies.ca"
}
},
{
"logic": "or",
"query": {
"fieldName": "phone1",
"eval": "equal",
"value": "(604) 786-2703"
}
}
],
"tables": {
"Customer": [
"ID",
"Code",
"ExternalID",
"FirstName",
"LastName",
"city",
"LastYearPurchase",
"datecreated",
"email",
"phone1",
"branchcode"
],
"CustomerContact": [
"ID",
"CustomerCode",
"Contact1",
"Contact1Description",
"Contact1Phone",
"Contact1Email",
"Contact2",
"Contact2Description",
"Contact2Phone",
"Contact2Email",
"Contact3",
"Contact3Description",
"Contact3Phone",
"Contact3Email",
"Contact4",
"Contact4Description",
"Contact4Phone",
"Contact4Email",
"Contact5",
"Contact5Description",
"Contact5Phone",
"Contact5Email",
"Contact6",
"Contact6Description",
"Contact6Phone",
"Contact6Email"
],
"CustomerDepartment": []
},
"extendedInfo": {
"Branch": [
"ID",
"Code",
"Description"
]
}
}
{
"Results": {
"Success": true,
"Warning": false,
"HttpStatusCode": 200,
"GeneralMessage": "Returned 1 records",
"ExceptionMessage": null,
"Keys": [],
"Messages": [],
"Warnings": []
},
"Paging": {
"PageSize": 100,
"LargestID": 0,
"PagesRemaining": false
},
"Query": {
"fieldName": "ID",
"eval": "EQUAL",
"value": "303428",
"valueList": null,
"start": null,
"end": null
},
"SubQuery": [],
"Customer": [
{
"Fields": {
"ID": 303428,
"Code": "140773",
"ExternalID": "",
"FirstName": "ASH",
"LastName": "WILLIAMS",
"Suite": "",
"Address1": "555 BOUNDRY ROAD",
"Address2": "",
"City": "ABBOTSFORD",
"State": "BC",
"AccountType": "Open Item",
"AllowCharge": false,
"AveragePaymentDays": 0,
"Balance": 0.0,
"BillServiceCharge": true,
"BillToAccount": "",
"BirthDate": null,
"BranchCode": "140",
"BusinessPhone": "",
"Contact": "",
"CreditLimit": 0.0,
"DateCreated": "2020-12-10T00:00:00",
"DateModified": null,
"Dependants": 0,
"Directions": "",
"DoNotMail": false,
"Email": "",
"EmpAddress1": "",
"EmpAddress2": "",
"EmpAltIncome": 0.0,
"EmpAltIncomeDesc": "",
"EmpCity": "",
"EmpOccupation": "",
"EmpSalary": 0.0,
"EmpStartDate": null,
"EmpState": "",
"EmpZipCode": "",
"Employer": "",
"EnableCreditLimit": false,
"ExpiryDate": null,
"Extensions": 0,
"Fax": "",
"Field1": "",
"Field2": "",
"Field3": "",
"Field4": "",
"Field5": "",
"FinanceCompany": false,
"FinanceDocument": "",
"ItemListPriceCode": "CSP",
"LaborRate": "Rate 1",
"LastActivityDate": "2020-12-13T00:00:00",
"LastYearPurchase": 0.0,
"Longitude": 0.0,
"Latitude": 0.0,
"MapReference": "",
"MapZoneCode": "",
"MaritalStatus": "",
"MiddleName": "",
"Note": "",
"OtherListPriceCode": "CSP",
"OtherPhone": "",
"Overdue": 0,
"Overdue30": 0,
"Overdue60": 0,
"Overdue90": 0,
"PONumber": "",
"PORequired": false,
"Phone1": "",
"Phone2": "(604) 768-2404",
"PrintStatement": true,
"SSN": "",
"SerialListPriceCode": "CSP",
"ShowInvoicesHyperlink": true,
"Statement": "Print Only",
"Tax1Exempt": "",
"Tax2Exempt": "",
"Tax3Exempt": "",
"TaxCode": "BCP",
"ThirtyDayAccount": false,
"UserCreated": "03051",
"UserModified": "",
"Website": "",
"YTDPurchase": 448.87,
"ZipCode": "V3G 2N1",
"BankruptCode": "",
"CreditHold": false,
"WebNotShowRef": false,
"WebNotShowPastDueWarn": false,
"DoNotEmail": false,
"BillingEmail": "",
"InvoiceDeliveryMethod": "Print",
"WebViewPartsLookup": true,
"WebViewCurrentOrders": true,
"WebViewOpenPartsList": true,
"WebViewHistory": true,
"WebAccessType": "Retail",
"WebPassword2": "",
"WebCarrierCode": "",
"GoogleValidated": false,
"Phone1TextEnabled": false,
"Phone2TextEnabled": false,
"BusinessPhoneTextEnabled": false,
"FaxTextEnabled": false,
"WebAllowSearchAll": false,
"WebMessageUserCode": "",
"WebMessageRecUserCode": "",
"DoNotText": false,
"DoNotMMS": false,
"PreferredContact": "",
"WebSubmitClaim1Year": false,
"WebSubmitClaimSub": false,
"WebSubmitClaimWolf": false,
"WebReturnParts": false,
"UpdateContactInfo": false,
"SynchInMobileTech": false,
"WebLanguage": "English",
"SalespersonCode": "",
"CreditManagerUserCode": "",
"CreditHoldDays": 0,
"ForceCreditApproval": false,
"DoNotAllowSaveCreditCard": false,
"UseProjectPricing": false,
"ProjectCode": "",
"SaleReferralCode": "",
"Country": "",
"DeclineEmail": false,
"ParentCompanyCode": "",
"Table1Code": "",
"DoNotService": false,
"EmpAltSupervisor": "",
"EmpExt": "",
"EmpFromTime": "",
"EmpPayday": "",
"EmpPhone1": "",
"EmpSupervisor": "",
"EmpToTime": "",
"InvTypeCode": "",
"MailingAddress1": "",
"MailingAddress2": "",
"MailingCity": "",
"MailingEmail": "",
"MailingFax": "",
"MailingPhone": "",
"MailingSameAsPhysical": true,
"MailingState": "",
"MailingZipCode": "",
"PaymentTypeCode": "COD",
"WebChargeShipping": true,
"WebDefaultLocation": "",
"WebID": "",
"WebPassword": "",
"WebShipPreference": "Complete Ship"
},
"CustomerDepartment": [],
"ExtendedInfo": {
"Branch": {
"Fields": {
"ID": 11,
"Code": "140",
"Description": "Abbotsford"
}
}
}
}
]
}
{
"Results": {
"Success": false,
"Warning": false,
"HttpStatusCode": 400,
"GeneralMessage": null,
"ExceptionMessage": "Error. Empty Search Field",
"Keys": [],
"Messages": [],
"Warnings": []
},
"Paging": {
"PageSize": 100,
"LargestID": 0,
"PagesRemaining": false
},
"Query": {
"fieldName": null,
"eval": "EQUAL",
"value": "",
"valueList": null,
"start": null,
"end": null
},
"SubQuery": [],
"Customer": []
}
Feedback
Was this page helpful?
Thank you! Have additional feedback? We would love to hear from you!
Sorry to hear that. Please tell us how we can improve.