Aysali logo

Admin

Articles are a built-in knowledge base for instant self-service answers. Manage content in the Articles area of the Aysali Bot admin panel (left navigation).

Configure display and URLs under Settings → Articles.

Display articles

WhereHow
Chat dashboardEnable Settings → Articles → Display in dashboard (articles-active)
Any conversationSend the rich message shortcode [articles link="https://example.com/help"]
Your websiteEmbed a dedicated articles page (REST API or JS below)

Related settings:

SettingPurpose
Display categoriesShow category list instead of flat article list on dashboard
Panel titleDashboard heading (default style: Help Center)
Articles button linkURL for All articles button
Articles page URLPublic help center URL — required for URL rewrite
Left menuCategory/article sidebar on single-article pages
Additional buttonExtra link at bottom of article pages

Embed on your website

Replace placeholders:

  • YOUR-BOT-URL — your Aysali Bot admin URL (for example https://360-bot.aysali.com)
  • YOUR-ADMIN-TOKEN — Settings → Admin → Admin API token (admin user only)

Query parameters: category, article_id, search, lang (two-letter code).

Server-rendered HTML via init-articles. Best for indexing by search engines.

<div id="sb-articles">
  <script src="YOUR-BOT-URL/js/min/jquery.min.js"></script>
  <script id="sbinit" src="YOUR-BOT-URL/js/min/main.min.js"></script>
  <?php
  $query = http_build_query(array_filter([
      'category'   => $_GET['category'] ?? null,
      'article_id' => $_GET['article_id'] ?? null,
      'search'     => $_GET['search'] ?? null,
      'lang'       => $_GET['lang'] ?? null,
  ]));
  $api_url = 'YOUR-BOT-URL/include/api.php' . ($query ? '?' . $query : '');
  $ch = curl_init($api_url);
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_SSL_VERIFYPEER => true,
      CURLOPT_POST           => true,
      CURLOPT_CONNECTTIMEOUT => 5,
      CURLOPT_POSTFIELDS     => http_build_query([
          'token'      => 'YOUR-ADMIN-TOKEN',
          'function'   => 'init-articles',
          'nojquery'   => false,
          'nojs'       => false,
      ]),
  ]);
  echo curl_exec($ch);
  curl_close($ch);
  ?>
</div>
POST fieldWhen to use
nojquery => truePage already loads jQuery
nojs => trueChat embed scripts are already on the page

The API returns article HTML plus required CSS/JS for articles.php rendering.

JS method (client-side)

Loads content asynchronously — simpler setup but weaker for SEO.

<script src="YOUR-BOT-URL/js/min/jquery.min.js"></script>
<script id="sbinit" src="YOUR-BOT-URL/js/min/main.min.js"></script>
<script>var SB_ARTICLES_PAGE = true;</script>
<div id="sb-articles" class="sb-loading"></div>

Use parent categories and assign every article to a category so the page structure renders correctly.

Hide the chat widget on the help page:

<script>var SB_DISABLED = true;</script>

See Settings → General → Widget embed path for the standard chat embed snippet.


One-page navigation

On each article page, a table of contents is generated automatically from h2 and h3 headings in the article body.


URL rewrite

Enable Settings → Articles → URL rewrite and set Articles page URL to your public help center base URL.

Default query URLs:

  • Category: articles.php?category=ID
  • Article: articles.php?article_id=ID

Friendly URLs via Apache .htaccess (rename articles to match your PHP filename):

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^articles?$ articles.php [L]
RewriteRule ^articles/category/(.*)$/?$ articles.php?category=$1 [L,QSA]
RewriteRule ^articles/(.*)$/?$ articles.php?article_id=$1 [L,QSA]
</IfModule>

Examples after rewrite:

  • https://example.com/help/category/LnNaZ
  • https://example.com/help/Ucsx6

Deep links without rewrite still work:

  • ?article=ARTICLE_ID — open one article
  • ?category=CATEGORY_ID — open one category

Language

Settings → Articles → Language

Manual translations

  • Article — open an article → + (top right) → choose language → translate. Delete via trash on the flag icon.
  • Category — same flow on category edit.

Automatic translation

Requires both:

  1. Multilingual via translation enabled (Google translation under chatbot/multilingual settings)
  2. Settings → Articles → Language → Automatic translation

Also set Default language for article source text. Translated language follows the visitor’s detected language unless you force ?lang=xx in the URL.

Language menu (when enabled) lists available translations at the bottom of an article.

Filtering rule: if at least one article in the visitor’s language exists in a category, only translated articles show; otherwise originals display.

Force a locale on any articles URL: ?lang=en or ?lang=ar.

Front-end string translations for article UI labels: Settings → Translations → Front end.


Tips and integrations

  • Categories required — assign every article to a category when using category navigation.
  • Button rich message — [button link="#article-ID" name="Read help"] opens an article inside chat.
  • Direct links — https://yoursite.com/help?article=Ucsx6 or ?category=LnNaZ.
  • AI chatbot training — articles are included in OpenAI/chatbot training data. After editing an article, re-run training; updates are not automatic.
  • Editor issues — if a block fails to save, disable browser extensions and retry.
  • Rich message fallback — [articles link="…"] uses the link attribute as plain text on WhatsApp, Messenger, and Telegram when the full UI cannot render.