Knowledge tools
On this page
Most tools take business_id: the business the call is for. talemo_list_businesses names the businesses this connection works in. A tool that changes something also takes dry_run; with it nothing changes, and the answer shows what the change would be, or the refusal it would get.
talemo_find_knowledge
Find in the business knowledge
Find the knowledge of a business — what its assistant and the replies to clients say in words: articles, answers to frequent questions and the voice of the business, the one article with place voice on how it talks to clients. The voice comes first, then by topic and title; there is no text in the list — talemo_get_knowledge shows it. One topic, the archived documents or those about one service; the counts of live documents by topic come along. Pass next as after for more. With q it searches instead: the closest live documents to the question by meaning, the closest first, each with the piece where it was found; nothing close enough — an empty list. by_meaning false means the search went by words only, and words_reason says why: credits — the balance of the business is down to its reserve, ceiling — its AI spending limit for the month is used up, unavailable — the search by meaning did not answer this time. Prices, durations and schedules are not in knowledge: talemo_list_services and the schedules have them. When: the client asks what the business does, says or requires. How: q — the question in the client's words; without it topic, archived and service narrow the list. Next: a hit has no text — talemo_get_knowledge shows it; an empty list means the knowledge has no answer, so do not guess.
Guide: knowledge/knowledge-search.
- Reads only, changes nothing
Parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
after | string | optional | Continue after this document: next of the previous answer. |
archived | boolean | optional | True — the archived documents instead of the live ones. |
business_id | string | required | Business ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden. |
limit | integer | optional | How many documents, 1 to 500; 200 when left out. With q — 1 to 20; 5 when left out. |
q | string | optional | Search: the question in words, up to 300 characters — the closest live documents by meaning, with the piece where it was found. Ask it the way the client did, in the client's words and language, not translated and not cut to keywords: a question nothing answers reaches the business in these words. Takes no topic, archived, service or after. |
service | string | optional | Service ID: only the documents about this service. The service_id values that talemo_list_services lists. |
topic | string | optional | One topic: about, directions, services, rules, payment, faq or communication — the topic of the voice of the business, which holds only the voice. Left out — all. |
Described in: Explaining the online admin to a salon owner, How the online admin uses the knowledge, Knowledge entry, Searching the knowledge
talemo_get_knowledge
See a knowledge article
Show one knowledge document: its text, the other wordings of the question of an answer, the branches and services it is about — none means the whole business — its version, who wrote it and who approved it. The voice has no title. When: after talemo_find_knowledge found a document you need in full — its list has no text. How: document_id from talemo_find_knowledge. Next: answer from this text; what it does not say, the business has not said — do not fill it in.
Guide: knowledge/knowledge-entry.
- Reads only, changes nothing
Parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
business_id | string | required | Business ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden. |
document_id | string | required | Document ID: talemo_find_knowledge finds them. |
Described in: How the online admin uses the knowledge, Knowledge entry, Versions, history and removed entries
talemo_get_knowledge_history
See the versions of a knowledge article
Show what happened to a knowledge document, newest first: each version whole — created, edited, archived or restored, the text it had, who wrote it and who approved it. Pass next as before for older versions.
Guide: knowledge/versions-and-removed.
- Reads only, changes nothing
Parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
before | integer | optional | Versions older than this number: next of the previous answer. |
business_id | string | required | Business ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden. |
document_id | string | required | Document ID: talemo_find_knowledge finds them. |
limit | integer | optional | How many versions, 1 to 100; 20 when left out. |
Described in: Versions, history and removed entries
talemo_list_knowledge_proposals
See suggested changes to the knowledge
List the proposals to the knowledge of a business, newest first: what each would make of a document, what the document was, who proposed it, the conversations it is drawn from, whether the document changed since, similar — a live document a new one looks like, decided one by one — and the decision. A question without an answer comes from the online admin: it has no body, its questions are how the clients asked it, and asked_again is how many new clients asked the same after it was rejected. How many wait and how many can be approved together come along. A role that keeps only its own sees only its own proposals. Pass next as before for more, or proposal for one.
Guide: knowledge/suggestions.
- Reads only, changes nothing
Parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
before | string | optional | Proposals older than this one: next of the previous answer. |
business_id | string | required | Business ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden. |
document | string | optional | Document ID: only the proposals to change this document. |
limit | integer | optional | How many proposals, 1 to 100; 50 when left out. |
mine | boolean | optional | True — only the proposals of this person. |
proposal | string | optional | Proposal ID: only this proposal, in any state unless state is named. One this person may not see answers an empty list. |
state | string | optional | open — waiting for approval (the default), decided — approved or rejected. |
via | string | optional | Who proposed: person, or program — a business key or a connected assistant like this one. |
Described in: Explaining the online admin to a salon owner, How the online admin uses the knowledge, Knowledge suggestions
talemo_propose_knowledge
Suggest a change to the knowledge
Propose a change to the knowledge of a business: a new document, an edit of a document as a whole, or its removal. Nothing changes until a person with the right approves it in Talemo; until then the assistant keeps answering the old way. An edit and a removal name the version they start from: a newer one is refused with knowledge.version_conflict and params.version. The same proposal already waiting is answered with it, and new conversations are added to it; when it is someone else's and the role keeps only its own, the answer has no note and no author. The same text rejected before and not waiting comes back only with a conversation it did not have, otherwise knowledge.proposal_rejected. A new document close in meaning to a live one comes back with similar: a person decides whether a second one is needed. With dry_run there is no similar: comparing costs money, so it happens only when the proposal is made.
Guide: knowledge/suggestions.
- Changes data
- The same call twice gives the same result
Parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
action | string | required | What to propose: create — a new document; edit — change a document as a whole; archive — remove a document, so the assistant no longer knows it. |
body | string | optional | Text, 1 to 10 000 characters, paragraphs on new lines. Needed for a new document; left out in an edit keeps it. |
branches | array of string | optional | Branch IDs the document is about, all of them as they will be; none — the whole business. |
business_id | string | required | Business ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden. |
conversations | array of string | optional | Conversation IDs the proposal is drawn from — every conversation whose messages it retells: talemo_list_conversations finds them. Ignoring a chat withdraws the proposals drawn from it, so name each one. |
document_id | string | optional | Document ID for edit and archive: talemo_find_knowledge finds them. |
dry_run | boolean | optional | True — queue nothing and answer the proposal as it would be queued. |
kind | string | optional | A new document: article, or answer to a frequent question. |
note | string | optional | Why, up to 500 characters: what the person asked or noticed. |
place | string | optional | voice — the new document is the voice of the business: an article of the topic communication without a title, one per business. |
questions | array of string | optional | Other wordings of the question of an answer, up to 20. |
services | array of string | optional | Service IDs the document is about, all of them as they will be. |
title | string | optional | Title, 1 to 120 characters on one line; for an answer — the question itself. Left out in an edit keeps it. |
topic | string | optional | Topic: about, directions, services, rules, payment or faq. Needed for a new document; left out in an edit keeps it. The topic communication holds only the voice of the business: anything else there is refused with request.body_invalid and params.field topic — put how the business talks to clients into the voice as an edit of it. |
version | integer | optional | The version the change starts from — version of talemo_get_knowledge. Needed for edit and archive. |
Described in: Knowledge suggestions, Onboarding a new business