Base URLhttps://ottla.ai/api/v1

Getting started

How Ottla fits into your store

Terms used in both the console and the API, and the field name we call each one.

Updated 7 min read

On this page
Several brands from one install

A few ideas run through every page of these docs. A workspace holds one or more websites. Each website has its own markets and languages, its catalogue and content, and the widgets shoppers chat with. API keys and webhooks belong to the workspace. Get these straight and the field names in the API reference make sense on sight.

Workspace

Your workspace is your Ottla account: the console, the plan, the team and everything synced into it. Team members have one of five roles (Owner, Admin, Member, Viewer or Moderator), and there is no charge per seat. A moderator sees only the reviews and product questions of the websites they are given.

One person can belong to several workspaces with a single login and switch between them, which is how agencies work across client stores. Each workspace is billed separately; there is no agency or parent account.

API keys and webhooks belong to one workspace, and a key never reads another workspace’s data. Your catalogue and conversations are filtered to your workspace on every request, so another merchant’s assistant cannot see them. The check is built into the application and refuses any request that has no workspace.

Website

A website is Ottla’s record of one storefront. A Magento install becomes a website when you complete the Connect to Ottla process. Headless and custom storefronts become websites when you add them via Storefront → Websites and select Custom / headless (REST API) as the platform.

In the API it is website_id, and it is Ottla’s own number, not Magento’s. The widget’s Install snippet carries it as data-website-id. A key can be limited to one website, and most are. A request made with such a key does not need website_id: the key decides.

Websites list in the Ottla console with a Magento store and a headless store Example data

Markets and languages

On Magento, each website you switch on becomes a brand in Ottla with its own products, prices and answers, and each of its store views becomes a language of that brand. A shopper on one brand never gets another brand’s products, prices or answers.

In the API, three fields describe where a shopper is: scope_ref (a market or language reference, up to 64 characters), locale and currency. You may still see store_view_id; it is the older field and is still accepted. How many storefronts each plan includes is on the pricing page. The multi-store and languages page covers the shopper side.

Catalogue and content

Ottla answers from what your store sends it: products, categories, CMS pages (including static blocks placed on them), FAQs, reviews, blog posts and documents such as size guides or datasheets. Identify each item by external_id (your platform’s own id) or by sku.

How much Ottla can hold is your plan’s knowledge item allowance. A typical product uses roughly 1 to 3 items; long pages and each extra language use more. If you reach the allowance, new items are skipped and reported while existing ones keep updating, so nothing you already have goes stale.

Prices and stock come from your store’s own data: synced from Magento every few minutes, or checked live with Magento when you switch on live pricing and stock. On a custom platform they come from the data you send (see sync a catalogue from any platform). Guardrails remove any price or stock claim that data does not support.

Widgets and placements

A widget is the chat as shoppers see it: its look, its wording and how it behaves. You build it in Storefront → Widgets, and the API knows it by its public_id, which looks like wgt_ followed by 20 letters and digits. A widget runs in one of three modes: chat (a floating launcher), sidebar (docked to one side) or inline (inside an element on your page).

Where it appears is a separate decision. On Magento, a placement row in the module settings picks the widget, page type and screen edge. Anywhere else, the pages you paste the Install snippet into decide.

Conversations and visitors

Three ids tie a chat together:

  • session_id groups the questions of one conversation. Send the same value for each turn.
  • answer_id identifies one answer (the ask endpoint returns it), so feedback and events can point at it.
  • vid (stored in the ottla_vid cookie) is the visitor id. Ottla sets it only when the shopper’s privacy mode allows it: after a yes, or, for stores outside the UK and the EU, until the shopper says no (see cookie consent), and the widget then uses it to list that shopper’s earlier chats on the same device.

Answered questions

Plans include a monthly allowance of answered questions. Only answers from the assistant draw on it, which keeps the count easy to predict.

What uses your monthly answered questions
Activity Uses an answered question?
Each answer from /ask, including polite refusals Yes
A reply to the assistant’s clarifying question No: the question and its clarification count once
/ask while a person is handling the chat No
Questions in the console Playground No
/search, /compare, /product-search, /autocomplete No
/recommendations, /suggested-questions, /product-questions No
Events, feedback and handoffs No
Catalogue sync No (it uses knowledge items instead)

When the month’s allowance and any prepaid credits are both used, /ask returns 402 plan_limit_exceeded and the widget pauses until you add credits, change plan or the next month starts. The console stays open, and nothing is billed after the fact. Plans and credits are on the pricing page.

Handoffs

Shoppers can ask for a person at any time. Handoffs go to your team in Ottla’s Support inbox with the conversation attached, and can also be forwarded to your own help desk by webhook. The API calls a handoff an escalation, and its id is escalation_id.

Results and attribution

For all orders made following use of each Ottla feature, Insights → Analytics displays the number and value, split by currencies, of those orders, and of the lines added from that feature. Those figures come from order events, which the Magento module sends for you and a custom store reports through the events API.

This only indicates use of the various features prior to these orders and does not establish any degree of causation. To measure cause, holdout experiments (Growth and above) hide a recommendation row from a share of visitors and compare.

Console and API names

The same thing in the console and in the API
In the console In the API
Workspace No field: it comes from the key
Website website_id
Market or language scope_ref, locale
Widget widget (its public_id)
Conversation session_id
Answer answer_id
Visitor vid, ottla_vid
Handoff escalation_id
Product external_id, sku
Knowledge document source_type

FAQ

Frequently asked questions

Is website_id the same as Magento’s website id?

No. It is Ottla’s own id for the storefront. The widget’s Install snippet shows it as data-website-id, and the Magento module stores it for you when you connect.

Which calls use my answered questions?

Only answers from /ask, refusals included. Playground questions, search, recommendations, events, feedback, handoffs and syncing do not.

Can one login manage several client stores?

Yes. One person can belong to several workspaces and switch between them. Each workspace is billed separately, and there is no agency account.

What personal data does Ottla receive?

Order history arrives with customers replaced by pseudonymous references. A shopper’s name or email reaches Ottla only when they ask for a person, sign up for an alert, or use account features the store has switched on. See data and privacy.

Does a reply to the assistant’s clarifying question use another answered question?

No. When the assistant asks a short clarifying question and the shopper picks an option, the original question and the clarified answer count once.