DocsStore platforms

Noli on any website.

A custom build, Webflow, Wix, Squarespace, OpenCart, PrestaShop or plain HTML. Two pieces make Noli work there: a script tag for the AI agent and loyalty widget, and your backend sending each order to Noli so customers earn points.

What you set up

PieceWhat it gives youWho does it
1. Widget scriptThe AI agent, rewards, balance and sign-in on every pageAnyone who can edit the site's HTML - one line
2. Orders → NoliPoints on every order, taken back on cancel or refundYour developer - one HTTPS call from your backend
3. Reward codesCodes that work at your checkoutYou, in the Noli admin (and optionally your developer)
4. Seamless login (optional)Logged-in customers are recognised without a codeYour developer - a signed token
5. Product feed (optional)The agent recommends your productsYou - a feed URL

The technical part for your developer - payloads, code samples, the signed token and a test checklist - is in the developer guide, in English and Bulgarian.

💡

On Shopify, WooCommerce or Magento 2 you don't need this page - each has a native integration. See Shopify, WooCommerce or Magento 2.

1. The widget script

In the Noli admin open Settings → Embed on any site, create a widget key and copy the line. Paste it once, just before the closing </body> tag:

<script async src="https://app.heynoli.ai/widget/v1/noli-widget.js" data-noli-key="pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></script>
⚠️

Paste it as one line, into a code field. Some CMS and WYSIWYG editors turn the indentation of a multi-line <script> into non-breaking spaces, which corrupts the attribute names - and the bubble silently fails to appear.

Settings → Embed on any site. The widget key is safe in page source.

Where to paste it

PlatformWhere
WebflowSite settings → Custom code → Footer code, then Publish.
WixSettings → Custom code → Add custom code → Body - end, All pages.
SquarespaceSettings → Developer tools → Code injection → Footer.
WordPress (no WooCommerce)A header/footer code plugin, or your theme’s footer.php before </body>. With WooCommerce, use the plugin instead.
Google Tag ManagerNew tag → Custom HTML → paste → trigger All Pages → Submit.
OpenCartcatalog/view/theme/<theme>/template/common/footer.twig, before </body>; clear the theme cache.
PrestaShopA custom-code module, or themes/<theme>/templates/_partials/footer.tpl; clear the cache.
Custom / headlessYour root layout or HTML template, once, before </body>.

On load the script fetches your branding - colours, logo, currency, point name, greeting - from your Noli settings, so the key is all it needs. Visitors chat as guests and sign in with an email or phone code to see their balance and redeem rewards.

Once you are live, add your domains to the key's allowed-origins list on the same page - including the www. variant - so a copied key can't be used elsewhere.

2. Send orders to Noli

The widget alone does not award points: Noli needs to hear about each order. Your backend sends it with one HTTPS call, using the secret API key from Settings → API & Security:

  • When the order is paid (or fulfilled) - Noli matches the customer by phone or email and awards points with your earn rules, tiers and boosts. Someone who hasn't joined yet gets the points when they sign up.
  • When it is canceled or refunded - the same call with that status takes the points back.
  • Reward codes used on the order - listed in the call, they are marked as used in Noli.

Sending the same order twice is safe: one order earns once. Payloads and code samples are in the developer guide.

⚠️

Send orders from your server, not from the browser. A call made from the order-confirmation page uses the public key, and Noli can't trust it: the points wait until the customer confirms the purchase (for example by scanning the receipt) instead of landing straight away. The secret key must never appear in page source.

3. Reward codes that work at your checkout

When a customer redeems a reward, Noli hands them a code. On a custom site Noli can't create discounts in your shop by itself, so for each reward you choose how the code works:

  • A fixed code - when you create the reward in Rewards, enter a code that already exists in your shop's discount system (e.g. LOYAL10). Every customer who redeems that reward gets that code. Set its limits in your shop. A reward left without a code can't be redeemed on a custom site.
  • A unique code per customer - your developer exposes an endpoint that creates a code in your shop, and Noli calls it on every redemption. See the promo-code section of the REST API and write to support@heynoli.ai - we switch it on with you.

Either way, list the codes used on each order in the order call (step 2), so Noli marks them as used.

4. Seamless login (optional)

If your site has its own customer accounts, logged-in customers can be signed into the widget automatically - no second login. Your server signs a short-lived token (HS256 JWT) with the signing secret from Settings → Embed on any site and puts it on the page:

<script async src="https://app.heynoli.ai/widget/v1/noli-widget.js"
  data-noli-key="pk_live_…" data-noli-identity="<signed token>"></script>

The token carries the customer's email, name and an expiry of a few minutes. How to build it, with PHP and Node examples, is in the developer guide.

⚠️

The signing secret stays on your server. Only the signed, short-lived token goes into the page. A secret in page source lets anyone sign in as any of your customers.

5. Products for the AI agent (optional)

The agent recommends products from a product feed. Add the Google Shopping XML or CSV feed your site already produces (for Google Merchant Center and the like) under Settings → Product Feed, and Noli keeps it in sync. To collect phone numbers with consent, see Opt-in forms.

Optional widget attributes

Everything below comes from your Noli settings already. Set a data-* attribute on the script tag only to override it on this site:

AttributeDefaultNotes
data-noli-key—Required. The widget key from Settings → Embed on any site.
data-noli-colorbrand colourBubble and accent colour (hex).
data-noli-text-color#ffffffText colour on the bubble and buttons.
data-noli-positionright"right" or "left".
data-noli-offset-bottom20Pixels from the bottom.
data-noli-offset-side20Pixels from the side.
data-noli-iconchatchat · star · gift · heart · sparkle
data-noli-heading"<business> Rewards"Chat window title.
data-noli-localeyour Noli languageTwo-letter locale, e.g. bg, en, ro.
data-noli-currencyyour Noli currencyISO code shown next to prices, e.g. EUR.
data-noli-notificationtrue"false" hides the teaser card.
data-noli-notification-headingbusiness nameTitle of the teaser card.
data-noli-identity—A signed identity token for a logged-in customer (see Seamless login).

For full control, set window.NoliConfig = {…} before the script tag - those keys win over everything else.

Check that it all works

  1. The bubble shows on the site, in your colours.
  2. Sign in to the widget with a test customer's email or phone.
  3. Place a paid test order as that customer - the points show in the widget and in Noli within seconds.
  4. Cancel or refund it in your shop - the points are taken back.
  5. Redeem a reward in the widget - the code works in your cart.

Troubleshooting

SymptomWhat to check
The bubble doesn't appearThe script tag in the page source - mangled attribute names mean the editor rewrote it (re-paste as one line). A typo in data-noli-key. The domain on the key's allowed-origins list, with and without www..
Orders don't earn pointsThe call uses the secret key (sk_live_…) from your server. The order status is paid, fulfilled or completed. The API is enabled under Settings → API & Security, and failed calls are listed there.
Points stay "pending"The customer hasn't joined yet (they get them on sign-up), the call used the public key, or online loyalty is switched off under Settings → Web Integration.
A reward code doesn't work at checkoutThe fixed code exists in your shop, is active and its limits allow it.
Logged-in customers still get asked for a codeThe token is signed with the current signing secret, uses HS256, and hasn't expired.