to get a personalized navigation.
to get a personalized navigation.
Im trying to post a subaccount to the sales order lines without any luck.
The order is created in visma.net successfully, but the subaccount dosent change.
The subaccount in the json is 0000-14-0000.
Any ide why its not changed on the lines ?
URL: https://integration.visma.net/API/controller/api/v1/
salesorderMethod: POST
"lines": [
{
"uom": {
"value": "STK"
},
"note": {
"value": null
},
"shipOn": {
"value": "2020-09-15T06:38:55.348Z"
},
"lineNbr": {
"value": 1
},
"freeItem": {
"value": false
},
"poSource": {
"value": null
},
"quantity": {
"value": 1
},
"unitCost": {
"value": 0
},
"completed": {
"value": false
},
"markForPO": {
"value": false
},
"operation": "Insert",
"unitPrice": {
"value": 20
},
"warehouse": {
"value": "1"
},
"invoiceNbr": {
"value": null
},
"reasonCode": {
"value": null
},
"subaccount": [
{
"segmentId": 1,
"segmentValue": "0000"
},
{
"segmentId": 2,
"segmentValue": "14"
},
{
"segmentId": 3,
"segmentValue": "0000"
}
],
"alternateID": {
"value": null
},
"inventoryId": {
"value": null
},
"projectTask": {
"value": null
},
"requestedOn": {
"value": "2020-09-15T06:38:55.349Z"
},
"salesPerson": {
"value": null
},
"taxCategory": {
"value": "3"
},
"branchNumber": {
"value": "1"
},
"discountCode": {
"value": null
},
"lotSerialNbr": {
"value": null
},
"shipComplete": {
"value": "BackOrderAllowed"
},
"discUnitPrice": {
"value": null
},
"commissionable": {
"value": false
},
"discountAmount": {
"value": null
},
"expirationDate": {
"value": null
},
"manualDiscount": {
"value": false
},
"discountPercent": {
"value": 0
},
"inventoryNumber": {
"value": "300"
},
"lineDescription": {
"value": "Vareprøve: (Parkett Skagen Eik Snow - 1731789)"
},
"overshipThreshold": {
"value": 100
},
"undershipThreshold": {
"value": 100
},
"salesOrderOperation": {
"value": null
}
},
Solved! Go to Solution.
Hi,
We have had a look at your JSON and tested it in our local company.
Firstly, salesOrderOperation should always have a value, either "Issue" or "Receipt".
Secondly, the issue with subaccount not being accepted seems to have to do with the salesPerson field:
With "salesPerson": {"value": "null"} :
Without the "salesPerson" field:
We do not recommend sending any fields with null, if a field is not meant to be used in the operation, please omit it.
Please remove the field and try again.
Thank you.
Hello,
Sending
"salesPerson": { "value": "xxx" },
is causing the zeroization of the subaccount value.
This is the same behaviour as it's derived from the Financials UI. SubAccount will always be resetted to its default value when you select/include a Sales Person.
Workaround:
Exclude the "SalesPerson" field from your payload while POSTing a salesorder then if necessary, this can be added by the PUT request.
Hi, I have encountered the same issue. I have tried the workaround without success. I still get the same issue when sending a PUT request updating the salesperson field. This is the payload I am sending when this issue occurs:
{
"lines": [
{
"salesPerson": {
"value": "03"
},
"operation": "Update",
"lineNbr": {
"value": 3
},
}
],
"orderType": {
"value": "EK"
}
}
The update goes through and the sales person is set to 03 but the dimension values that originally is set to "3-090-03110" is updated to "0-090-00000"
Copyright © 2022 Visma.com. All rights reserved.