Start and continue a conversation
Start a conversation with aninstruction and the report_id to work on.
list_reports lists the reports, and
create_report returns the id of a
new one.
report_id to let the Analyst create the report the instruction
describes. sandbox_id then picks the sandbox the new report lands in. Without
it, the report is created in the live environment. A report_id or a
conversation_id already names its own environment.
conversation_id the first
call returned, a retry included. Without it, Qobra starts a new conversation
and the Analyst loses what was said. The conversation is the same one the
report’s Analyst panel shows in the Qobra web app. A conversation continues on
the report it is attached to, including a report the Analyst created during
it.
Read the result
status says where the turn stands:
answered: the Analyst finished its turn. Relayanswerto the user.awaiting_user: the Analyst paused on a question (pending_question). The client must show it to the user as it is, wait for their reply, and send that reply as the nextinstructionwith the sameconversation_id.running: the turn is still going. Each call waits about 45 seconds before answeringrunning, and a turn can take several minutes. Callget_analyst_turnwith theconversation_idto keep waiting. Callingask_analyston a conversation whose turn is still running is refused, and the instruction is not sent.
report the conversation works on, in the same shape
list_reports lists it, with the
link to open it. It is the report the call named, or the one the Analyst
created during the conversation. It is null while the Analyst has not created
one yet.
Changes apply directly
The Analyst works without a draft copy. It writes its changes to the report as it makes them, as the Analyst panel does in the Qobra web app.Permissions and availability
What the Analyst does depends on the caller’s own rights, as in the web app:- With write access on every report, the Analyst does everything: metrics, columns, filters, pivot table, chart, sharing and dashboards.
- With write access on this report only, the Analyst edits its columns, sorts, pivot table and chart.
- On a report the caller may only read, the Analyst explains it.
- Without a
report_id, the Analyst creates a new report. This needs write access on every report. A caller without it is refused and told to pass areport_id.
Parameters
Body
Body
What to ask or tell the Analyst, in the user’s words: ‘show the attainment
per rep by quarter’, ‘why is EMEA at zero?’. Also the user’s answer to a
question it is waiting on.
Id of the report to work on: the id list_reports returns, or the one
create_report returned. Omit it with no conversation_id to have the Analyst
create the report itself; a conversation_id already names its report.
Id of the conversation to continue: the one an earlier ask_analyst call
returned. Omit it only to start a new conversation.
Response
Body
Body
‘answered’: the Analyst finished its turn, its reply is in answer.
‘awaiting_user’: it paused on a question (pending_question); show it to the
user and send their reply as the next instruction of this conversation with
ask_analyst. ‘running’: a turn is still going; call get_analyst_turn with
this conversation_id to keep waiting for it. One of:
answered,
awaiting_user, running.The conversation this turn belongs to, the same one the web app shows in the
Analyst panel. Pass it back on every follow-up call.
The question the Analyst is waiting on, with the options it offers
(multi_select: several may be picked; the user may also answer in their own
words). Set only when status is ‘awaiting_user’.