Talemo Docs

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.

All topics of Knowledge

talemo_archive_knowledge

Remove an entry from the knowledge

Remove an entry from the knowledge: the assistant and the replies to clients stop saying it. Nothing is lost — the entry comes back with talemo_restore_knowledge, and its versions stay. Removing an entry that is already removed returns it as it is. The change is saved only after the person approves it. With dry_run nothing changes and the answer is the document as it would be.

Guide: knowledge/knowledge-entry.

  • Changes data
  • The same call twice gives the same result

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
document_idstringrequiredDocument ID: talemo_find_knowledge finds them.
dry_runbooleanoptionalTrue — change nothing and answer the document as it would be after the change.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Knowledge entry

talemo_create_knowledge

Write down a new entry in the knowledge

Write down in the knowledge of the business what the person tells you to: a new article, an answer to a frequent question, or the voice of the business, the one article with place voice on how it talks to clients. Use it when the person asks to write something down — a rule, a policy, how the business talks — and keep their meaning in their words; add no fact they did not say. Prices, durations and schedules are not knowledge: the price list and the schedules keep them. Look first with talemo_find_knowledge: an entry that exists is changed with talemo_update_knowledge, not written a second time. Nothing changes until the person approves it, and the assistant keeps answering the old way until then. The voice is one per business: a second one is refused with knowledge.voice_taken. A closed branch cannot be a branch the entry is about: status 422, code record.reference_missing, params.field branches and params.reason closed. With dry_run nothing is written and the answer is the document as it would be.

Guide: knowledge/knowledge-entry.

  • Changes data

Parameters

ParameterTypeRequiredMeaning
bodystringrequiredText, 1 to 10 000 characters, paragraphs on new lines. The person's meaning in the person's words: nothing they did not say.
branchesarray of stringoptionalBranch IDs the document is about; none — the whole business.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
dry_runbooleanoptionalTrue — write nothing and answer the document as it would be written.
kindstringrequiredarticle, or answer — an answer to a frequent question.
placestringoptionalvoice — the new document is the voice of the business: an article of the topic communication without a title, one per business.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
questionsarray of stringoptionalOther wordings of the question of an answer, up to 20.
servicesarray of stringoptionalService IDs the document is about.
titlestringoptionalTitle, 1 to 120 characters on one line; for an answer — the question itself. A voice has none.
topicstringrequiredTopic: about, directions, services, rules, payment or faq. The topic communication holds only the voice of the business: anything else there is refused with request.body_invalid and params.field topic.

Described in: Knowledge entry

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

ParameterTypeRequiredMeaning
afterstringoptionalContinue after this document: next of the previous answer.
archivedbooleanoptionalTrue — the archived documents instead of the live ones.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
limitintegeroptionalHow many documents, 1 to 500; 200 when left out. With q — 1 to 20; 5 when left out.
qstringoptionalSearch: 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.
servicestringoptionalService ID: only the documents about this service. The service_id values that talemo_list_services lists.
topicstringoptionalOne 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 base, Knowledge entry, Searching the knowledge base

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

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
document_idstringrequiredDocument ID: talemo_find_knowledge finds them.

Described in: How the online admin uses the knowledge base, 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

ParameterTypeRequiredMeaning
beforeintegeroptionalVersions older than this number: next of the previous answer.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
document_idstringrequiredDocument ID: talemo_find_knowledge finds them.
limitintegeroptionalHow 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. A proposal with learned true was laid by the pass over the chats of a connection: script_rule is a rule for the online admin's script (rule_then says whether it hands the chat over; a rule written in two parts has rule_when, the situation, and rule_do, what to do in it, and its body holds both), price_check is a price quoted in chats against the service's own (both in whole units of the branch currency), nothing is written by it, and the voice, answers and articles come from the owner's own replies; conversations[].messages are the replies it is drawn from and quote is the start of the first one, read from the chat for the first three. learning says where that pass is: reading n of m, waiting for a date, for money or for the monthly spending limit, ready, nothing new, or not finished. 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

ParameterTypeRequiredMeaning
beforestringoptionalProposals older than this one: next of the previous answer.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
documentstringoptionalDocument ID: only the proposals to change this document.
limitintegeroptionalHow many proposals, 1 to 100; 50 when left out.
minebooleanoptionalTrue — only the proposals of this person.
proposalstringoptionalProposal ID: only this proposal, in any state unless state is named. One that does not exist or this person may not see is refused with not_found.
statestringoptionalopen — waiting for approval (the default), decided — approved or rejected.
viastringoptionalWho 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 base, 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

ParameterTypeRequiredMeaning
actionstringrequiredWhat to propose: create — a new document; edit — change a document as a whole; archive — remove a document, so the assistant no longer knows it.
bodystringoptionalText, 1 to 10 000 characters, paragraphs on new lines. Needed for a new document; left out in an edit keeps it.
branchesarray of stringoptionalBranch IDs the document is about, all of them as they will be; none — the whole business.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
conversationsarray of stringoptionalConversation 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_idstringoptionalDocument ID for edit and archive: talemo_find_knowledge finds them.
dry_runbooleanoptionalTrue — queue nothing and answer the proposal as it would be queued.
kindstringoptionalA new document: article, or answer to a frequent question.
notestringoptionalWhy, up to 500 characters: what the person asked or noticed.
placestringoptionalvoice — the new document is the voice of the business: an article of the topic communication without a title, one per business.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
questionsarray of stringoptionalOther wordings of the question of an answer, up to 20.
servicesarray of stringoptionalService IDs the document is about, all of them as they will be.
titlestringoptionalTitle, 1 to 120 characters on one line; for an answer — the question itself. Left out in an edit keeps it.
topicstringoptionalTopic: 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.
versionintegeroptionalThe version the change starts from — version of talemo_get_knowledge. Needed for edit and archive.

Described in: Knowledge suggestions, Onboarding a new business

talemo_restore_knowledge

Bring an entry back to the knowledge

Bring a removed entry back to the knowledge: the assistant and the replies to clients say it again, with the text it had. An entry that is live returns as it is. The voice of the business cannot come back while another voice is live: status 409, code knowledge.voice_taken — remove that one first. An entry that was only about a service that was deleted with it cannot come back: status 409, code knowledge.service_gone — write a new entry about a service that exists. The change is saved only after the person approves it. With dry_run nothing changes and the answer is the document as it would be.

Guide: knowledge/knowledge-entry.

  • Changes data
  • The same call twice gives the same result

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
document_idstringrequiredDocument ID: talemo_find_knowledge finds them.
dry_runbooleanoptionalTrue — change nothing and answer the document as it would be after the change.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Knowledge entry

talemo_update_knowledge

Change an entry in the knowledge

Change one entry of the knowledge as a whole, the way the person asks: its text, title, topic, other wordings of the question, the branches and services it is about. Read it first with talemo_get_knowledge and pass its version: the change starts from that version, and if the entry was saved since, it is refused with knowledge.version_conflict and params.version — read the entry again and redo the change. A field left out stays as it is; the text, the wordings, the branches and the services are given whole, as they will be. A removed entry is brought back first (knowledge.archived). A closed branch cannot be added to the branches the entry is about: status 422, code record.reference_missing, params.field branches and params.reason closed. A change that changes nothing makes no version. The change is saved only after the person approves it, with what the entry is now and what it will be shown. With dry_run nothing changes and the answer is the document as it would be.

Guide: knowledge/knowledge-entry.

  • Changes data
  • May overwrite or remove existing data

Parameters

ParameterTypeRequiredMeaning
bodystringoptionalText as a whole, 1 to 10 000 characters, paragraphs on new lines. Left out keeps it.
branchesarray of stringoptionalBranch IDs the document is about, all of them as they will be; none — the whole business. Left out keeps them.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
document_idstringrequiredDocument ID: talemo_find_knowledge finds them.
dry_runbooleanoptionalTrue — change nothing and answer the document as it would be after the change.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
questionsarray of stringoptionalOther wordings of the question of an answer, all of them as they will be, up to 20. Left out keeps them.
servicesarray of stringoptionalService IDs the document is about, all of them as they will be. Left out keeps them.
titlestringoptionalTitle, 1 to 120 characters on one line; for an answer — the question itself. Left out keeps it; the voice has none.
topicstringoptionalTopic: about, directions, services, rules, payment or faq. Left out keeps it. The topic communication holds only the voice.
versionintegerrequiredThe version the change starts from — version of talemo_get_knowledge. A newer one is refused with knowledge.version_conflict and params.version.

Described in: Knowledge entry