Vishal Chaudhari
04/01/2025, 10:07 AMCeligo AI
04/01/2025, 10:07 AMAI generated answer (using internal Slack threads):Based on the conversations, to set a custom price level on a sales order line item using the PHP toolkit, you would set the
price
field to -1
which represents 'Custom'. Here is an example:
php
$itemRecRef = new RecordRef();
$itemRecRef->internalId = $itemInternalId;
$salesOrderItemObj->item = $itemRecRef;
$salesOrderItemObj->quantity = $base_unit;
$salesOrderItemObj->price = '-1';
$salesOrderItemObj->rate = $price;
However, it's important to note that the price level must be assigned to the item for this to work. If the price level is not assigned to the item, the system will default to the base price.
If you're still having issues, it might be due to the order in which you're setting the values. When you set price
after setting the quantity/rate, it could potentially wipe the rate and default to the price from the item. Try moving price
further up before you set the rate.
php
"item": {
"items": [
{
"item": {
"id": 30112
},
"price":{
"id":"-1"
}
"quantity": 5,
"rate": 17000
}
]
}
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/01/2025, 10:07 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814376295
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812404871
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810883582
Celigo AI
04/01/2025, 10:08 AM