OpenCart keywords

An ASE endpoint that turns a visitor message into product search keywords so your OpenCart store can look up matching products and feed them back to the agent.

Store visitors ask things like "do you have a Samsung gaming laptop?". The agent cannot see your catalogue, but your store can. This endpoint extracts the search terms from the message so your store code can run the product search and hand the results to the agent as context.

Request

POST /api/v1/platform/opencart/keywords
X-Widget-Key: pk_…      (or X-Secret-Key from your server)
Content-Type: application/json

{ "message": "samsung gaming laptop var mı" }

Response

{ "keywords": ["samsung", "gaming", "laptop"], "is_product_query": true }

is_product_query is false for messages that are not about products ("where is my order?"); keywords is then empty. Brand names and product types are kept, filler words are dropped, and the extraction works in the visitor's language.

Typical flow

  1. The visitor sends a message through the widget.
  2. Your store script calls this endpoint with the same message.
  3. If is_product_query is true, search your catalogue with the keywords.
  4. Send the top results (name, price, URL, stock) to POST /api/v1/context for the session.
  5. The agent's next reply includes the products.

The same approach works for any platform; the endpoint is not tied to OpenCart beyond its name. The free ASE OpenCart 4 extension does all of these steps for you.

Cost

Keyword extraction uses a short AI call and counts against your token quota (or your own key with BYOK). It does not count as an AI message.