Solved

Creating Customer in Acumatica

  • 15 August 2023
  • 3 replies
  • 208 views

I am trying to create a new customer in Acumatica using the API URL https://acumatica.ipaas.com/AcumaticaERP/entity/default/22.200.001/Customer. The request body that I am using is as follows:

{
"CustomerID": {"value": "Checking2"},
"CustomerName": {"value": "Aurangzeb"},
"CustomerClass": {"value": "LOCAL"},
"StatementCycleID": {"value": "EMO"},
"DiscTakenAcctID": {"value": "CHECKING"}
}

However, I am getting the following error message:

"error": "Inserting 'Customer' record raised at least one error. Please review the errors.; DiscTakenAcctID: 'Cash Discount Account' cannot be empty."

The DiscTakenAcctID field in the request body is set to the ID of a valid cash discount account. I am not sure why I am getting this error.

Can anyone help me troubleshoot this issue?

icon

Best answer by jsheehan56 15 August 2023, 16:59

View original

3 replies

Userlevel 4
Badge

cash discount accounts are a required field in customer setup. 

Double check your customer class and ensure you have a default cash discount account and default cash discount subaccount.

Most clients never use these, especially in construction where I primarily live, its related to discount credit terms (ex. 2/15 net 30 terms offering a 2% discount if a customer pays in 15 days). 

Holdover from the system primarily being designed for retail / distribution. 

Userlevel 7
Badge +4

@testingDev,

You can try the suggestion by @jsheehan56.

If you don’t want to default the Cash Discount Account, you can extend the default endpoint and map the GL Account fields and send them in the PUT request.

Below are a few screenshot of the steps,

  • Create an entity within Customer entity to map the GL Account fields
  • Map the Cash Discount Field to the entity created in the previous step

Use the payload like below to set the field when creating the Customer,

{
"CustomerID": {
"value": "Checking2"
},
"CustomerName": {
"value": "Aurangzeb"
},
"CustomerClass": {
"value": "LOCAL"
},
"STATEMENTCYCLEID": {
"VALUE": "EMO"
},
"DiscTakenAcctID": {
"value": "CHECKING"
},
"GLAccounts": {
"CashDiscountAccount": {
"value": "90000"
}
}
}

 

For more details on extending the endpoint refer, https://help.acumatica.com/(W(4))/Help?ScreenId=ShowWiki&pageid=c450492e-06fe-4563-95c3-efa76975415b

 

Feel free to post if you have any questions. Good Luck.!

Userlevel 3
Badge

Please Review the Customer Profile

  1. Under GL Accounts Tab / Cash Discount Account (GL ACCOUNT CODE) Field is required
  2. To minimized this error update your Customer Class and put GL Code on the Cash Discount Field, every time you will create a new customer it will automatically have GL Code on the field.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved