API – Customer Transaction Warnings

Introduction

When creating new customers, along with a few other entities, you may get a transactional warning response. These warn that you may have entered duplicate or inaccurate data into the system. If you are entering data for a customer, you will receive transactional warnings if any of the following data matches an existing customer or fails to pass an accuracy check:

  • Social Security/Social Insurance Number
  • Email Address
  • Phone Number
  • Primary Address
  • Mailing Address

Dealing With Warnings

There are two ways to deal with transactional warnings—you can correct your data, or you can set your request to ignore the warnings. We will discuss both options below.

Correct Data

Using this option, you would choose to either change the data you are submitting or to use the data that is already in the system. The response that includes the transactional warnings will include information about the customers that you may be trying to duplicate. You can use this information to decide whether the customer you are trying to enter is a duplicate, and you can use the customer ID from the response to update the existing customer. We recommend this course of action because it will help you keep your customers updated, and it will help you avoid entering duplicate information into the system.

Ignore Warnings

You can choose to ignore the warnings by adding “__ignoreWarnings”: true to your payload. This will add the information despite the warnings. This is not the recommended behavior because it could result in adding invalid or duplicate data.

For more information on bypassing warnings, see API – Bypassing Transactional Warnings.

Response

The transactional warnings response looks similar to the following:

{
"data": {
"error": {
"message": "Transaction warnings found.",
"type": "TransactionWarningException",
"code": 500
},
"warnings": [
"(Phones) Phone ‘4555555555’ already found in the system (Customer ID 396: Johnny Test Doe)."
]
},
"status": 500,
"config": {
"method": "POST",
"transformRequest": [
null
],
"transformResponse": [
null
],
"jsonpCallbackParam": "callback",
"url": "https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers",
"headers": {
"Autopal-Instance-Id": 5200243,
"Authorization": "Bearer cc0199330033f963007b07e75f1b7fb6b7025887",
"Content-Type": "application/json",
"Accept": "application/json, text/plain, */*"
},
"data": {
"status": "Active",
"customerType": "customer.type.individual",
"customerIdType": "customer.idType.ssn",
"gender": "customer.gender.male",
"generationCode": "customer.generationCode.none",
"Phones": {
"results": [
{
"phone": "4555555555",
"isPrimary": "1",
"isSecondary": "0",
"delete": false,
"_index": 0,
"type": "customer.phoneType.cell",
"__isDirty": false,
"carrierVerified": 1,
"__lookupInProgress": false,
"carrierName": "Sprint",
"isLandLine": 0
}
]
},
"PrimaryAddress": {
"country": "company.country.usa",
"address1": "19011 test",
"zipcode": "92102",
"city": "San Diego",
"state": "geo.state.CA",
"verify": null
},
"MailAddress": {
"country": "company.country.usa",
"city": "San Diego",
"state": "geo.state.NY",
"address1": "170011 N 250 W",
"zipcode": "92105"
},
"CustomFieldValues": {},
"birthDate": "1984-03-02",
"firstName": "Johnny",
"middleName": "Test",
"lastName": "Doe",
"ssn": "35555555",
"email": "test12347@gmail.com"
}
},
"statusText": "Internal Server Error"
}

The relevant parts of the response are the “error” and the “warnings” sections. These will tell you that you are receiving transactional warnings and what those warnings are.


How did we do?


Powered by HelpDocs (opens in a new tab)