update_customer_store_credits
Adjust a customer's store credit balance by adding or deducting funds for recharges, refunds, or promotional rewards.
Instructions
[WRITE] 調整客戶儲值金餘額。
【用途】 增加或扣除客戶儲值金,常用於儲值金充值、退款補償、活動贈送等場景。
【呼叫的 Shopline API】
PUT /v1/customers/{customer_id}/store-credits
【回傳結構】 dict 含 success: bool, resource_id: str, message: str。
【副作用】
客戶儲值金餘額立即變動
異動紀錄會寫入客戶的儲值金歷史(可透過 get_customer_profile 查看)
扣除後如餘額不足,API 可能回傳錯誤
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"amount": "<amount>"
},
"name": "update_customer_store_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | 調整備註/原因 | |
| amount | Yes | 調整金額(正數=增加,負數=扣除) | |
| customer_id | Yes | 客戶內部 ID |