Noli on Magento 2.
Connect a Magento 2 store with an Integration from your Magento admin. Noli reads your orders every few minutes, awards and takes back points, builds your customer profiles and turns rewards into real Magento coupons - nothing to install on the store.
What the integration does
| What | How |
|---|---|
| Points from orders | Every 5 minutes Noli reads the orders that changed and awards points when an order reaches the state you chose (Complete by default). |
| Cancellations and refunds | A canceled or fully refunded order takes its points back. A credit memo for part of the order takes back only its share. |
| Customer profiles | Your whole order history is read once into Noli, so the AI agent, segments and the Inbox know each customer's orders and spend. |
| Reward coupons | Each reward a customer activates becomes a single-use cart price rule in Magento, with its own code. |
| Chat widget | One script in Magento's HTML Head puts the Noli agent on every page, Hyvä and Luma themes alike. |
It works with Magento Open Source and Adobe Commerce 2.4. Magento Open Source sends no webhooks, so Noli reads the store through its REST API instead - which is why points arrive within about five minutes of an order changing, not instantly.
Before you start
- A Magento admin user that can create Integrations (System → Extensions → Integrations).
- About ten minutes. If your developer or agency runs the store, send them this page - steps 1 and 2 happen in Magento and Cloudflare.
- If the store sits behind Cloudflare or another firewall, access to its rules. Noli calls your API from changing IP addresses, so an IP allowlist won't work - you allow a header instead (step 2).
1. Create the Integration in Magento
- Add a new Integration
In the Magento admin open System → Extensions → Integrations and click Add New Integration. Name it
Noli. Leave Callback URL and Identity link URL empty, and enter your admin password to confirm. - Give it access to these resources
On the API tab set Resource Access to Custom and tick:
- Sales → Operations → Orders (with Actions → View), Invoices, Shipments, Credit Memos - to read orders and refunds
- Marketing → Cart Price Rules - to create reward coupons
- Customers → All Customers and Customer Groups - coupons apply to every customer group
- Stores → Settings → All Stores - coupons need to know your websites
- Save and activate
Save, then click Activate next to the Integration and Allow. Magento shows four values: Consumer Key, Consumer Secret, Access Token and Access Token Secret. Keep that window open, or come back to it later under Edit → Integration Details.
You don't need to change Allow OAuth Access Tokens to be used as standalone Bearer tokens. Noli signs every request with OAuth 1.0a, which works with Magento's default settings. If you have turned that setting on, Noli uses it too.
2. Let Noli through Cloudflare or your firewall
Skip this if nothing sits in front of your store. Otherwise, open Settings → Magento in the Noli admin first: it shows a key made for your store, in the form X-Noli-Key: …. Every request Noli makes carries that header.
In Cloudflare, add one rule:
- Go to Security → WAF → Custom rules → Create rule.
- Match when URI Path starts with
/rest/and the request headerX-Noli-Keyequals your key. - Action: Skip - all remaining custom rules, rate limiting rules, managed rules and Super Bot Fight Mode.
- Place it first in the list and deploy.
(starts_with(http.request.uri.path, "/rest/") and any(http.request.headers["x-noli-key"][*] eq "<your key>"))
Bot Fight Mode (the free-plan version) can't be skipped by a rule. If it is on and Noli reports blocked requests, turn it off under Security → Bots, or move to Super Bot Fight Mode, which the rule can skip.
Other firewalls work the same way: allow requests to /rest/ that carry the header. The key is not a password for your store - without the four Integration values it opens nothing - but treat it as private anyway.
3. Connect the store in Noli
- Open Settings → Magento
In the Noli admin, under Integrations.
- Paste the store URL and the four values
The URL is your storefront address, e.g.
https://www.your-store.com. If Magento is installed in a subfolder, include it (https://your-store.com/shop). - Click Connect Magento store
Noli checks the keys against your orders API, reads your websites and customer groups, and runs the first sync straight away. Your order history keeps importing in the background over the next runs; the page shows when it's done.
When orders earn points
Noli follows the order's state in Magento - the fixed set every store has - not your custom status labels, so renamed or extra statuses (for example one set by your courier module) don't need any setup.
| Magento state | What Noli does |
|---|---|
complete | Awards points (invoiced and shipped). This is the default. |
processing | Awards points only if you tick Also when the order is Processing on the Magento settings page. |
canceled | Takes back the order's points, or voids them if the customer hadn't joined yet. |
closed | Refunded in full: takes back whatever points are left. |
| Any state with a credit memo | Takes back the refunded share. A per-order rule keeps its points while the rest stays above the minimum. |
- Points are counted on the order's grand total less what was refunded, with your earn rules, tier multipliers and boosts - the same as on Shopify and WooCommerce.
- Customers are matched by phone, then email. Someone who hasn't joined your program yet gets the points when they sign up with the same phone or email.
- Orders placed before you connected don't earn. They go into the customer profiles only. To credit past purchases, use the points history import.
- Noli identifies an order by the number your customers see (e.g.
000012345). If your success page already sent orders to Noli with the script from Settings → Web Integration, an order can't earn twice - you can remove that script once the store is connected.
Cash on delivery: if you award on Processing, a parcel that comes back only loses its points once the order is canceled or refunded in Magento. Keep the default (Complete) if returned parcels are common for you.
Rewards become Magento coupons
When a customer redeems a reward or converts points in the chat or portal, Noli creates a cart price rule in your Magento admin under Marketing → Cart Price Rules, named Noli: <reward> – <code>:
- Specific coupon, usable once, for all your websites and customer groups.
- Percentage rewards become Percent of product price discount; fixed rewards and points conversions become Fixed amount discount for whole cart; free-shipping rewards set Free Shipping for the shipment.
- A reward's minimum order becomes a Subtotal equals or greater than condition, and its end date becomes the rule's To date.
The customer enters the code in the cart or at checkout. Don't edit or delete these rules while their codes are still out there - they are the coupons.
Put the chat widget on the storefront
- Copy the script
In the Noli admin open Settings → Embed on any site, create a widget key if you have none, and copy the script tag.
- Add it to Magento
Go to Content → Design → Configuration, edit your store view, open HTML Head → Scripts and Style Sheets, paste the tag and save. Flush the cache under System → Cache Management.
<script async src="https://app.heynoli.ai/widget/v1/noli-widget.js" data-noli-key="pk_live_…"></script>
The script loads on its own and needs nothing from the theme, so it works on Hyvä as well as Luma. Customers sign in to the widget with an email or phone code; signing in automatically with their Magento account comes with the Noli Magento module.
Products for the AI agent
The agent recommends products from a product feed. Add the Google Shopping XML or CSV feed your store already produces (for Google Merchant Center, Doofinder and the like) under Settings → Product feed, and Noli keeps it in sync.
Troubleshooting
| Message in Noli | What to do |
|---|---|
| Magento rejected the keys | The Integration isn't activated, or a value was cut short when copying. Open it in Magento, check the four values, and reauthorize if you changed its resources. |
| No access to orders | The keys work but the Integration lacks the Sales resources. Add them (step 1), save, and click Reauthorize. |
| Blocked before it reached Magento | Cloudflare or a firewall answered instead of Magento. Add the X-Noli-Key rule (step 2) and make sure it is first in the list. |
| No Magento REST API at this address | Check the store URL - it should be the storefront address, including the subfolder if Magento has one. |
| Coupons need access to Stores and Customer Groups | The store is connected, but rewards can't create rules yet. Add those resources to the Integration and connect again. |
| Points for an order haven't arrived | Check the order's state (Complete by default), that it was placed after you connected, and the last sync time on the Magento page. Sync now runs a sync immediately. |
Security notes
- The four Integration values stay on Noli's servers. They are never sent to a browser, not even to your own admin.
- The Integration can only use the resources you ticked - give it nothing more than the list above.
- To cut access, click Disconnect in Noli, then delete or deactivate the Integration in Magento. Points and coupons already issued stay valid.