How to write to a table b_sale_basket_props?

Bitrix 16.5.10.
I need script to record SV-VA of the basket to the table b_sale_basket_props. How to write to b_sale_basket I found.

$basket = $newOrder->getBasket();
$item = self::getExistsItem($basket, 'catalog', $product['offer']['externalId']);
$item->setField('CUSTOM_PRICE', 'Y');
$item->setField('PRICE', $itemCost);
$item->setField('DISCOUNT_NAME', ");
$item->setField('DISCOUNT_VALUE', ");
$basket->save();


and in b_sale_basket_props record don't know. Help to write?
August 19th 19 at 23:04
1 answer
August 19th 19 at 23:06
$basketPropertyCollection = $item->getPropertyCollection();
$basketPropertyCollection->setProperty([
[
 'NAME' => 'Color',
 'CODE' => 'COLOR',
 'VALUE' => 'Red',
 'SORT' => 100,
],
]);
$basketPropertyCollection->save();

Find more questions by tags 1C-BitrixPHP