补齐成交跟进:按线路推成交通知、收下未成交原因、协商中按工作日再问。
成交走询价消息服务;陆运/海运私聊下一句能记下原因;协商中回执写明顺延三个工作日和下次 9:00。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -193,15 +193,46 @@ class HttpLedger:
|
||||
out.setdefault("needsPdf", str(format).lower() == "pdf")
|
||||
return out
|
||||
|
||||
def transition(self, *, work_order_no: str, to_status: str) -> dict[str, Any]:
|
||||
out = self._post(
|
||||
"/inquiry/agent/ticket/transition",
|
||||
{"workOrderNo": work_order_no, "toStatus": to_status},
|
||||
)
|
||||
def transition(
|
||||
self,
|
||||
*,
|
||||
work_order_no: str,
|
||||
to_status: str,
|
||||
remark: str = "",
|
||||
lost_reason: str = "",
|
||||
next_followup_at: str = "",
|
||||
deal_notify_summary: str = "",
|
||||
) -> dict[str, Any]:
|
||||
body: dict[str, Any] = {"workOrderNo": work_order_no, "toStatus": to_status}
|
||||
if remark:
|
||||
body["remark"] = remark
|
||||
if lost_reason:
|
||||
body["lostReason"] = lost_reason
|
||||
if next_followup_at:
|
||||
body["nextFollowupAt"] = next_followup_at
|
||||
if deal_notify_summary:
|
||||
body["dealNotifySummary"] = deal_notify_summary
|
||||
out = self._post("/inquiry/agent/ticket/transition", body)
|
||||
if not out.get("ok") and out.get("status"):
|
||||
out["ok"] = True
|
||||
return out if out.get("ok") else {"ok": False, "error": out.get("error") or "transition_failed"}
|
||||
|
||||
def patch_lost_reason(self, *, work_order_no: str, lost_reason: str) -> dict[str, Any]:
|
||||
"""未成交后记下原因。不改六态。"""
|
||||
out = self._post(
|
||||
"/inquiry/agent/ticket/patchLostReason",
|
||||
{"workOrderNo": work_order_no, "lostReason": lost_reason},
|
||||
)
|
||||
return out if out.get("ok") else {"ok": False, "error": out.get("error") or "patch_lost_reason_failed"}
|
||||
|
||||
def claim_due_negotiate(self) -> list[dict[str, Any]]:
|
||||
"""认领到期协商再问,主账会清空再问时刻防重发。"""
|
||||
out = self._post("/inquiry/agent/ticket/claimDueNegotiate", {})
|
||||
rows = out.get("tickets") or out.get("result") or []
|
||||
if isinstance(rows, list):
|
||||
return [dict(x) for x in rows if isinstance(x, dict)]
|
||||
return []
|
||||
|
||||
def match_sea_staff(self, *, origin: str, destination: str) -> list[dict[str, Any]]:
|
||||
"""主账按线路返回启用的海运产品岗。"""
|
||||
out = self._post(
|
||||
|
||||
Reference in New Issue
Block a user