mirror of
https://github.com/hoshikawa2/compass_backoffice.git
synced 2026-07-09 13:54:20 +00:00
bugfixes
This commit is contained in:
@@ -245,17 +245,43 @@ async def open_siebel_sr(state: AgentState) -> AgentState:
|
||||
)
|
||||
|
||||
# Update metadata with the SR response
|
||||
sr_number = response.get("interactionProtocol")
|
||||
# sr_number = response.get("interactionProtocol")
|
||||
|
||||
raw_response = response.get("result") or response
|
||||
|
||||
sr_number = (
|
||||
raw_response.get("interactionProtocol")
|
||||
or raw_response.get("crmProtocol")
|
||||
or raw_response.get("protocol")
|
||||
)
|
||||
|
||||
# context = dict(context)
|
||||
# response["notes"] = notas
|
||||
# context["siebel_sr_data"] = response
|
||||
#
|
||||
# state = update_state_metadata(state, request_context=context)
|
||||
# await set_current_step(state, GraphStep.SIEBEL_SR_OPENED)
|
||||
#
|
||||
# msg = f"Siebel SR opened successfully: {sr_number}"
|
||||
# logger.info(msg+'\n')
|
||||
# state["final_response"] = msg
|
||||
context = dict(context)
|
||||
response["notes"] = notas
|
||||
context["siebel_sr_data"] = response
|
||||
|
||||
raw_response = response.get("result") or response
|
||||
raw_response["notes"] = notas
|
||||
|
||||
context["siebel_sr_data"] = raw_response
|
||||
|
||||
state = update_state_metadata(state, request_context=context)
|
||||
|
||||
state["crmProtocol"] = sr_number
|
||||
state["fieldsToUpdate"] = raw_response.get("fieldsToUpdate")
|
||||
state["transitions"] = raw_response.get("transitions") or []
|
||||
|
||||
await set_current_step(state, GraphStep.SIEBEL_SR_OPENED)
|
||||
|
||||
msg = f"Siebel SR opened successfully: {sr_number}"
|
||||
logger.info(msg+'\n')
|
||||
logger.info(msg + "\n")
|
||||
state["final_response"] = msg
|
||||
|
||||
if success_tag:
|
||||
|
||||
Reference in New Issue
Block a user