wesell

n8n community nodes for the WeSell e-commerce fulfilment platform (orders, products, fuzzy location/product matching).

Package Information

Released: 3 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.2

Available Nodes

Documentation generating…

Documentation

@wesell/n8n-nodes-wesell

n8n community nodes for the WeSell e-commerce fulfilment platform.

Each node wraps one WeSell API operation, so you can build order/product automations
visually in n8n. Includes two fuzzy-matching nodes that resolve free-text (Arabic or
Latin) city/area/product names to WeSell UUIDs — handy when ingesting messy order data
from spreadsheets, chat bots, or other stores.

Nodes

Node What it does API
WeSell Create Order Create an order (with line items) POST /orders
WeSell Update Order Update an existing order's details PUT /orders/{id}
WeSell Confirm Order Confirm an order, optionally send to shipping POST /orders/{id}/confirm
WeSell Get Orders List orders — filter by phone, date range, status GET /orders
WeSell Get Order Fetch one order by UUID, order number, or tracking + company GET /orders/{id} · GET /orders/find-by-tracking/{tn}
WeSell Get Products List products with filters / pagination GET /products
WeSell Get Product Fetch one product by UUID or SKU GET /products/{id}
WeSell Get Users List team users (order-creator roles) for created_by GET /users
WeSell Fuzzy Match Location Resolve free-text city (+ area) to UUIDs GET /orders/meta/locations
WeSell Fuzzy Match Product Resolve free-text product name/SKU to a UUID GET /products/meta/all

Credentials — WeSell API

Field Example Notes
Subdomain mystore Your tenant. For https://mystore.wesell.world enter mystore.
Domain wesell.world Change only for staging/self-hosted.
API Token 12|abc… Sanctum token from Admin → API Keys.

The base URL is built as https://{subdomain}.{domain}/api/v1. The token is sent as
Authorization: Bearer …. The credential test hits GET /auth/me.

Required token abilities: orders:read, orders:write, products:read, users:read
(the fuzzy-location node uses the orders:read-scoped /orders/meta/locations endpoint;
Get Users needs users:read).

Attributing orders to a team member (created_by)

By default an order created via the API is attributed to the API token's owner. To
attribute it to a specific team member instead, set Created By (User UUID) on the
Create Order node (in Additional Fields) to a UUID from the Get Users node. The
server validates that the UUID is a user of your tenant with an order-creator role
(super_admin, admin, customer_support, vendor, customer_service), and the
supplied value overrides the automatic attribution.

Fuzzy matching

  • Names are normalized before scoring (Arabic diacritics/tatweel removed; أإآ→ا, ى→ي,
    ة→ه, ؤئ→ء; Arabic-Indic digits → Latin; whitespace collapsed) so real-world spelling
    variants still match.
  • Scoring uses Fuse.js. Output score is a confidence in [0,1]
    (1 = perfect). Tune with the Threshold parameter (lower = stricter).
  • The reference set is fetched once per node execution and reused across all input
    items, so matching a batch of rows is a single API call.
  • Output UUIDs feed straight into Create/Update Order (city_uuid, area_uuid,
    item product_uuid).

Products are returned as orderable units

The product read endpoints (GET /products, GET /products/{id}, GET /products/meta/all)
return only orderable products — simple products and child variations — each as its own
row with its own uuid/sku. Parent products (containers) are excluded and there is no
nested variations attribute. The name field is the product's display_name, so a
child variation reads as "Parent - Variation". This is what Fuzzy Match Product matches
against, and every matched uuid is directly orderable.

Development

npm install
npm run build      # tsc + copy icons
npm run lint

Then link into your n8n custom-nodes folder, or publish with npm publish.

License

MIT

Discussion