Getting started
You need a FcommerceBD account owner login (email verified) and a ChatGPT or Claude plan that allows custom connectors. You never paste an API key: the assistant signs you in to FcommerceBD, and you approve the connection. Menu names in ChatGPT and Claude change from time to time; look for "connectors".
Connect Claude
- In Claude, open Settings → Connectors.
- Choose Add custom connector. Name:
FcommerceBD. URL:https://api.fcommercebd.net/mcp. - Click Connect. A FcommerceBD window opens: sign in with your dashboard email and password.
- Review what Claude will be able to do and click Connect.
- In a chat, turn the FcommerceBD connector on and ask: "Show today's orders."
Connect ChatGPT
- Once FcommerceBD is listed in ChatGPT's plugin directory, open it there and click Connect. Until then (and for developers): turn on Developer mode in Settings → Security and login, open chatgpt.com/plugins and click +.
- Name:
FcommerceBD. MCP server URL:https://api.fcommercebd.net/mcp. Authentication: OAuth. - Sign in to FcommerceBD in the window that opens and approve the connection.
- Start a chat with FcommerceBD enabled and ask: "Compare this month's revenue with last month."
Gemini and others
Any MCP client that supports remote servers with OAuth 2.1 (dynamic client registration and PKCE) can connect the same way. Gemini is planned.
OAuth connection flow
Standard MCP authorization. The client discovers everything from the endpoint; nothing is configured by hand.
- The client calls
https://api.fcommercebd.net/mcpwithout a token and receives401withWWW-Authenticate: Bearer resource_metadata="https://api.fcommercebd.net/.well-known/oauth-protected-resource/mcp". - It reads the protected-resource metadata and
https://api.fcommercebd.net/.well-known/oauth-authorization-server. - It registers itself at
POST https://api.fcommercebd.net/oauth/register(dynamic client registration). Redirects are only accepted to the ChatGPT and Claude domains, their desktop apps, andlocalhostfor developer tools. - It opens
https://api.fcommercebd.net/oauth/authorizewith PKCE S256 (required;plainis refused). The merchant signs in and sees a consent screen listing what the assistant will be able to do and where they will be sent back. The redirect back carriesiss(RFC 9207) as well ascodeandstate. - It exchanges the code at
https://api.fcommercebd.net/oauth/token: an access token valid for 60 minutes and a refresh token valid for 30 days, scopemcp:use. Refresh tokens rotate on use. - Every MCP request carries the access token. FcommerceBD resolves the merchant and store from the token — never from tool arguments — and re-checks the role on each call.
Only the account owner can connect an assistant for now; team member logins are refused at sign-in.
MCP endpoint
| What | URL |
|---|---|
| MCP (Streamable HTTP, JSON-RPC) | https://api.fcommercebd.net/mcp |
| Health | https://api.fcommercebd.net/mcp/health → {"status":"ok","version":"7.0","oauth":true,"mcp":true} |
| Protected resource metadata (RFC 9728) | https://api.fcommercebd.net/.well-known/oauth-protected-resource/mcp |
| Authorization server metadata (RFC 8414) | https://api.fcommercebd.net/.well-known/oauth-authorization-server |
There is one endpoint for every merchant; there are no per-store URLs. Dates are Asia/Dhaka and weeks run Saturday to Friday. Money is {"amount": "1250.00", "currency": "BDT"}. Customer phone numbers are returned masked to the last four digits.
curl -s https://api.fcommercebd.net/mcp/health
Available tools
Every tool declares a required permission, whether it only reads or changes data, and whether the merchant must confirm first. Each also states the three MCP hints readOnlyHint, destructiveHint (overwrites, removes or publishes something that cannot be taken back) and openWorldHint (reaches outside FcommerceBD — only the Facebook tools do). Tools that change data are recorded in the store's audit log. Tools marked asks first answer the first call with status: "confirmation_required" and a confirmation_token without changing anything; the assistant asks the merchant and repeats the call with the token (single use, 5 minutes, bound to the exact arguments).
Orders
Orders: list and filter get_orders
Retrieve the merchant's orders for a period, with optional status, payment and text filters.
| Argument | Type | Description |
|---|---|---|
period | string | When the orders were placed: today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, all_time, last_N_days (e.g. last_7_days), last_N_weeks, last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. Omit for all time. |
status | array | Only orders in these statuses. Omit for any status. |
payment_status | string: unpaid, partial, paid, refunded | Only orders with this payment status. |
search | string | Order code, customer name, phone or product text. |
limit | integer | Orders per page (max 50). |
cursor | string | next_cursor from the previous page. |
Returns: store, period, filters, totals, orders, next_cursor
Orders: inspect courier booking get_courier_booking
Read the saved courier receipt and status for one order in this merchant's store.
| Argument | Type | Description |
|---|---|---|
order_code required | string | Saved order code returned by get_orders. |
Returns: booking
Orders: review courier booking prepare_courier_booking
Prepare a courier delivery review for one saved confirmed order.
| Argument | Type | Description |
|---|---|---|
order_code required | string | Saved confirmed order code from get_orders. |
delivery_type | integer: 0, 1 | 0 home delivery, 1 hub delivery. |
alternative_phone | string | null | Optional buyer alternative phone explicitly supplied by the buyer. |
recipient_email | string | null | Optional recipient email explicitly supplied by the buyer. |
note | string | null | Optional courier delivery note. |
Returns: workflow
Orders: send reviewed booking to courier approve_courier_booking
Send the merchant-approved courier booking for this saved order to Steadfast.
| Argument | Type | Description |
|---|---|---|
order_code required | string | Saved order code whose booking plan was reviewed. |
workflow_id required | string | Workflow ID returned by prepare_courier_booking; reuse it to inspect the same outcome. |
plan_hash required | string | Exact hash of the preview approved by the merchant. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, workflow
Returns: inspection queue and recovery get_returns
See returned parcels, inspection results and units recovered for resale in the merchant’s store.
| Argument | Type | Description |
|---|---|---|
status | string: awaiting_inspection, inspected | Filter return status; omit for all returns. |
cursor | string | The next_cursor from the previous page; omit on the first page. |
limit | integer | Maximum returns per page, 1–50; default 25. |
Returns: returns, next_cursor
Returns: record a physical parcel inspection record_return_inspection
Record a human’s parcel inspection, restock sealed unexpired units and preserve unsellable or missing quantities.
| Argument | Type | Description |
|---|---|---|
return_code required | string | An owned return code from get_returns. |
received_on required | string | Actual parcel receipt date YYYY-MM-DD in store time. |
items required | array | One physical inspection for every return line; counts must account for every expected unit. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, return
Products
Products: list and filter get_products
Retrieve the merchant's products, filtered by stock level, status, category or text.
| Argument | Type | Description |
|---|---|---|
stock | string: low, out, in | low: at or below its reorder level (and above 0); out: nothing on hand; in: at least one on hand. |
status | string: active, draft, out_of_stock, archived | Only this status. Omit for everything except archived. |
category | string | Category slug. |
search | string | Text in the name or description. |
limit | integer | Products per page (max 50). |
cursor | string | next_cursor from the previous page. |
Returns: store, filters, scope, total, products, next_cursor
Products: find by name, SKU or barcode search_products
Find the product the merchant is talking about, by name, SKU, barcode, tag or category.
| Argument | Type | Description |
|---|---|---|
query required | string | What the merchant called the product: words of its name, a SKU, a barcode, a tag or a category. |
include_archived | boolean | Also search archived products (e.g. to restore one). Default false. |
limit | integer | Results to return (max 20). |
Returns: query, total, exact, results
Products: create create_product
Create a complete, merchant-ready product in one call — but only when the merchant already told you the selling price.
| Argument | Type | Description |
|---|---|---|
name required | string | Product name as the merchant says it (3–200 characters). |
selling_price | number | Required. What customers pay, in BDT. |
buy_price | number | What one unit costs the merchant (for profit); at most the selling price. Only if they said it. |
stock_quantity | integer | Units on hand now (opening stock). Default 0. |
reorder_level | integer | At or below this many units the product counts as low stock. |
compare_at_price | number | Old price shown struck through on the storefront ("was ৳1,590"); must be above the selling price. Only if the merchant said it. |
weight_grams | integer | Shipping weight in grams, if the merchant gave it. |
sku | string | "auto" = FcommerceBD generates it from the Commerce Brain's SKU format (e.g. TS-BLK-001); or the merchant's own code. Unique in the store. |
barcode | string | "auto" = an internal barcode from the Brain's prefix (e.g. FCB-20260928-000124, never GS1); or the merchant's own value. Unique in the store. |
short_description | string | One-line summary shown in lists (max 280 characters). |
meta_title | string | Search-engine title (keep within the Brain's title length, default 60). |
meta_description | string | Search-engine description (the Brain's length, default 155). |
description | string | Full description; basic HTML is allowed and cleaned. |
faq | array | Product FAQ you write, answering what buyers ask (max 10), shown on the product page. |
cta | string | The product's own call to action (max 200 characters); the Commerce Brain's CTA is used when empty. |
category_name | string | Category as the merchant says it, e.g. "Men's Fashion". An exact match (ignoring case, punctuation, plural s) is used; if several or only similar categories exist the call fails listing them with their category_id — ask the merchant which one; if none exists, creating it needs the merchant's confirmation. |
category_id | integer | A category_id from an earlier result or error, when the merchant picked one. |
create_category | boolean | true only when the merchant said to create a new category even though similar ones exist. Still needs their confirmation. |
tags | array | Search tags / Facebook hashtags, e.g. ["cotton", "fashion"]. |
colors | array | Colour options, e.g. ["red", "blue"]. Stored with the product; not separate stock per colour. |
sizes | array | Size options, e.g. ["M", "L", "XL"]. Stored with the product; not separate stock per size. |
images | array | Public image URLs, stored as links; the first is the cover unless cover_image says otherwise. |
cover_image | string | Which of `images` is the cover (its URL). |
status | string: draft, published | published = on sale now. Default draft. |
generated | array | Which fields you wrote yourself rather than the merchant (e.g. ["name", "meta_title", "meta_description", "description", "tags", "category_name", "image"]). Shown to the merchant in their prompt trace; changes nothing else. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: product, readiness, defaults_applied, category_created, category_match, status, action, confirmation_token, expires_at
Assets: what to create for a product plan_product_assets
List the nine creative assets a product should have, each with its size and a ready prompt in the Commerce Brain's style.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
Returns: product_id, assets, missing
Assets: save one asset you created save_product_asset
Save one creative asset you generated for a product, replacing only that kind if it already exists.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
kind required | string: white_background, lifestyle, flat_lay, story, facebook_square, facebook_cover, reel_cover, whatsapp_catalog, banner | Which asset this is. |
image | object | The image as a file (ChatGPT fills this in). |
image_base64 | string | Or: the image bytes as base64 or a data:image/…;base64, URL. |
image_url | string | Or: a public http(s) URL of the image. |
prompt | string | The prompt you used, kept with the asset. |
Returns: status, product_id, kind, url, version, gallery_image_id
Products: regenerate one picture in place replace_product_image
Replace one product picture with a new version while keeping its place, cover status and variant galleries.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
image_id required | string | The picture to replace (image_id from get_products). |
image | object | The new image as a file. |
image_base64 | string | Or: the new image as base64 or a data:image/…;base64, URL. |
image_url | string | Or: a public http(s) URL of the new image. |
Returns: status, image_id, url, is_cover, product
Products: show a picture in another variant too copy_image_to_variant
Add one of a product's pictures to another variant's gallery, first or last, without uploading it again.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variant_id | string | The variant's code (v_…) from get_products / search_products. |
variant | object | Or the variant as the merchant names it, e.g. {"Color": "Black", "Size": "XL"} (enough attributes to name exactly one). |
image_id required | string | The product picture to show in the variant. |
first | boolean | Put it first in the variant's gallery (default: last). |
Returns: status, variant
Products: update update_product
Change any field of one product that the dashboard's product form can change.
| Argument | Type | Description |
|---|---|---|
code required | string | The product code from get_products or create_product. |
name | string | Product name as the merchant says it (3–200 characters). |
selling_price | number | What customers pay, in BDT. |
buy_price | number | What one unit costs the merchant; at most the selling price. |
stock_quantity | integer | Units on hand now (not a change: the new total). |
stock_reason | string | Why stock changed, in the merchant's words (e.g. "counted the shelf", "3 damaged"). |
reorder_level | integer | At or below this many units the product counts as low stock. |
compare_at_price | number | Old price shown struck through on the storefront ("was ৳1,590"); must be above the selling price. Only if the merchant said it. |
weight_grams | integer | Shipping weight in grams, if the merchant gave it. |
sku | string | "auto" = FcommerceBD generates it from the Commerce Brain's SKU format (e.g. TS-BLK-001); or the merchant's own code. Unique in the store. |
barcode | string | "auto" = an internal barcode from the Brain's prefix (never GS1); or the merchant's own value. Unique in the store. |
short_description | string | One-line summary shown in lists (max 280 characters). |
meta_title | string | Search-engine title (keep within the Brain's title length, default 60). |
meta_description | string | Search-engine description (the Brain's length, default 155). |
description | string | Full description; basic HTML is allowed and cleaned. |
faq | array | Product FAQ you write, answering what buyers ask (max 10), shown on the product page. |
cta | string | The product's own call to action (max 200 characters); the Commerce Brain's CTA is used when empty. |
category_name | string | Category as the merchant says it, e.g. "Men's Fashion". An exact match (ignoring case, punctuation, plural s) is used; if several or only similar categories exist the call fails listing them with their category_id — ask the merchant which one; if none exists, creating it needs the merchant's confirmation. |
category_id | integer | A category_id from an earlier result or error, when the merchant picked one. |
create_category | boolean | true only when the merchant said to create a new category even though similar ones exist. Still needs their confirmation. |
tags | array | Replaces the tags, e.g. ["cotton", "summer"]. |
colors | array | Replaces the colour options; [] removes them. |
sizes | array | Replaces the size options; [] removes them. |
images | array | Replaces all images with these public URLs (links); the first is the cover. |
cover_image | string | image_id or URL of one of the product's images to make the cover. |
status | string: published, draft, archived | published = on sale (also restores an archived product); draft = hidden; archived = out of the shop and lists, history kept (asks the merchant first). |
generated | array | Which fields you wrote yourself rather than the merchant (e.g. ["name", "meta_title", "meta_description", "description", "tags", "category_name", "image"]). Shown to the merchant in their prompt trace; changes nothing else. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: product, changed, readiness, category_created, category_match, status, action, confirmation_token, expires_at
Products: duplicate duplicate_product
Create a new product as a copy of an existing one, optionally changing some fields.
| Argument | Type | Description |
|---|---|---|
code required | string | The product to copy (its code, from search_products or get_products). |
name | string | Name of the copy. Default: the original name + " (copy)". |
selling_price | number | Selling price of the copy, in BDT. Default: the original's. |
buy_price | number | Buy price of the copy. Default: the original's. |
stock_quantity | integer | Opening stock of the copy. Default 0. |
sku | string | SKU for the copy (must be unique). Default none. |
barcode | string | Barcode for the copy (must be unique). Default none. |
colors | array | Colour options of the copy (replaces the copied ones). |
sizes | array | Size options of the copy (replaces the copied ones). |
short_description | string | One-line summary of the copy. |
tags | array | Tags of the copy (replaces the copied ones). |
status | string: draft, published | Default draft. |
Returns: status, source_code, product, changed_from_source
Products: add variants add_product_variants
Add sellable options to a product — sizes, colours, materials, storage — each with its own SKU, barcode, price and stock.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variants required | array | One entry per variant to add (up to 30). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: added, product, status, action, confirmation_token, expires_at
Products: update a variant update_product_variant
Change one variant of a product: its stock, prices, SKU, barcode, weight, attributes or whether it is on sale.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variant_id | string | The variant's code (v_…) from get_products / search_products. |
variant | object | Or the variant as the merchant names it, e.g. {"Color": "Black", "Size": "XL"} (enough attributes to name exactly one). |
attributes | object | New attribute values, e.g. {"Size": "XXL"} — same names as the other variants. |
selling_price | number | New selling price of this variant, in BDT. |
buy_price | number | What one unit of this variant costs the merchant. |
compare_at_price | number | Old price shown struck through; above the selling price. |
sku | string | "auto" to regenerate, or the merchant's code. |
barcode | string | "auto" to regenerate, or the merchant's code. |
stock_quantity | integer | New total on hand (not a difference). |
stock_reason | string | Why the stock changed, e.g. "Received from factory". |
weight_grams | integer | Shipping weight in grams. |
status | string: active, inactive | inactive = not sold on the storefront. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: variant, status, action, confirmation_token, expires_at
Products: remove a variant remove_product_variant
Remove a variant the merchant no longer sells at all, after they confirm, keeping its order history.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variant_id | string | The variant's code (v_…) from get_products / search_products. |
variant | object | Or the variant as the merchant names it, e.g. {"Color": "Black", "Size": "XL"} (enough attributes to name exactly one). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: product, status, action, confirmation_token, expires_at
Products: change many prices bulk_update_prices
Change the selling or buy price of many products at once, by a percent, an amount or to a fixed price.
| Argument | Type | Description |
|---|---|---|
codes | array | Product codes to change. |
filters | object | Select products like get_products does, instead of codes. |
field | string: selling_price, buy_price | Which price to change. |
change | string: percent, amount, set | percent: by value %; amount: by value taka; set: to value taka. |
value | number | The percent or amount (negative lowers), or the new price for set. |
rounding | string: none, nearest_1, nearest_5, nearest_10 | Round computed prices to whole, 5 or 10 taka. Default none (to the paisa). |
items | array | Instead of a rule: new prices per product. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: changed_count, changes, status, action, confirmation_token, expires_at
Products: archive archive_product
Archive a product so it leaves the shop, product lists and order pickers while its history is kept.
| Argument | Type | Description |
|---|---|---|
code required | string | The product code from get_products. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: product, archived, status, action, confirmation_token, expires_at
Products: attach an image you created upload_generated_image
Attach a product photo you just created with your image tool to an existing product, and optionally make it the cover.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variant_id | string | The variant's code (v_…) from get_products / search_products. |
variant | object | Or the variant as the merchant names it, e.g. {"Color": "Black", "Size": "XL"} (enough attributes to name exactly one). |
image | object | The generated image as a file (ChatGPT fills this in for an image you created). |
image_base64 | string | Or: the image bytes as base64 or a data:image/…;base64, URL. |
image_url | string | Or: a public http(s) URL of the image. |
make_cover | boolean | Make it the cover now (the first picture of a product is the cover anyway). Default false. |
alt | string | Short description of the picture, e.g. the product name. |
Returns: status, image_id, url, is_cover, product, readiness
Products: upload image upload_product_image
Download an image from a URL, host it in FcommerceBD and add it to a product.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
variant_id | string | The variant's code (v_…) from get_products / search_products. |
variant | object | Or the variant as the merchant names it, e.g. {"Color": "Black", "Size": "XL"} (enough attributes to name exactly one). |
image_url | string | Public http(s) URL of the image (JPG, PNG or WebP, up to 5 MB). |
image | object | A file the merchant attached in ChatGPT, instead of image_url. |
alt | string | Short description of the picture for accessibility. Optional. |
Returns: status, image_id, url, is_cover, product
Products: picture upload link create_image_upload_link
Give the merchant a private link to upload a product picture when you cannot pass the image file yourself.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
make_cover | boolean | The first picture uploaded through the link becomes the cover. Default true. |
Returns: status, upload_url, expires_at, product
Products: set cover image set_cover_image
Make one of a product's images its cover (the main picture in the shop and in posts).
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
image_id required | string | The image_id (or the image URL) of one of the product's images. |
Returns: status, changed, product
Products: reorder pictures reorder_product_images
Put a product's pictures in the order the merchant wants them shown in the shop.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
image_ids required | array | image_ids in the new order, first = first in the gallery. |
Returns: status, changed, product
Products: remove a picture remove_product_image
Remove one picture from a product's gallery, after the merchant confirms which one.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
image_id required | string | The image_id (or URL) of the picture to remove. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: removed_image_id, product, status, action, confirmation_token, expires_at
Reports
Reports: sales pipeline get_sales_report
Report a period's sales pipeline: orders placed, confirmed, delivered, revenue and money still due.
| Argument | Type | Description |
|---|---|---|
period required | string | today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, last_N_days (e.g. last_7_days, last_30_days), last_N_weeks, last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. |
group_by | string: day, week, month, status, product | Add a breakdown: day, week, month, status, product. Omit for totals only. |
Returns: store, period, orders, pending, confirmed, cancelled, returned, delivered, revenue, receivable, breakdown
Reports: revenue get_revenue_report
Report revenue for a period — orders delivered and paid — with an optional day, week or month series.
| Argument | Type | Description |
|---|---|---|
period required | string | today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, last_N_days (e.g. last_7_days, last_30_days), last_N_weeks, last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. |
group_by | string: day, week, month | Add a breakdown: day, week, month. Omit for totals only. |
Returns: store, period, revenue, orders, series
Reports: profit get_profit_report
Report profit for a period: revenue, cost of goods, gross profit, expenses and net profit.
| Argument | Type | Description |
|---|---|---|
period required | string | today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, last_N_days (e.g. last_7_days, last_30_days), last_N_weeks, last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. |
group_by | string: day, week, month | Add a breakdown: day, week, month. Omit for totals only. |
Returns: store, period, revenue, cogs, gross_profit, expenses, net_profit, orders, uncosted_orders, series
Reports: compare periods compare_sales
Compare revenue, orders, units or gross profit between two periods, with the change in amount and percent.
| Argument | Type | Description |
|---|---|---|
period required | string | today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, last_N_days (e.g. last_7_days, last_30_days), last_N_weeks, last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. |
group_by | string: day, week, month | Add a breakdown: day, week, month. Omit for totals only. |
compare_to required | string | previous_period, same_period_last_year, or a period in the same forms as `period`. |
metric required | string: revenue, orders, units, gross_profit | revenue (delivered and paid, BDT), orders (placed), units (sold in revenue orders) or gross_profit (BDT). |
Returns: store, period, compare_to, metric, unit, definition, current, previous, change, current_series, previous_series
Customers
Customers: list get_customers
Retrieve the merchant's customers, built from their orders, with orders, spend and last order date.
| Argument | Type | Description |
|---|---|---|
period | string | Only orders placed in: today, yesterday, this_week, last_week, this_month, last_month, this_year, last_N_days (e.g. last_30_days), last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. Omit for all time. |
search | string | Part of the name or phone number. |
channel | string: online, offline, both | online: only online orders; offline: only in-store invoice sales (historic); both. |
pending_only | boolean | Only customers with a pending order. |
sort | string: recent, spent, orders | recent: last order first; spent: biggest spenders first; orders: most orders first. |
limit | integer | Customers per page (max 50). |
cursor | string | next_cursor from the previous page. |
Returns: store, period, total, stats, customers, next_cursor
Customers: repeat buyers get_repeat_customers
Find customers who came back — at least `min_orders` orders that were not cancelled or returned — and the repeat rate.
| Argument | Type | Description |
|---|---|---|
period | string | Count orders placed in: today, yesterday, this_week, last_week, this_month, last_month, this_year, last_N_days (e.g. last_30_days), last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. Omit for all time. |
min_orders | integer | Kept (not cancelled or returned) orders needed to count as a repeat customer. |
sort | string: recent, spent, orders | orders: most orders first; spent: biggest spenders first; recent: last order first. |
limit | integer | Customers per page (max 50). |
cursor | string | next_cursor from the previous page. |
Returns: store, period, min_orders, repeat_customers, customers_with_orders, repeat_rate, repeat_spent, total_spent, customers, next_cursor
Customers: history customer_history
Show one customer's lifetime summary and their orders, newest first.
| Argument | Type | Description |
|---|---|---|
customer required | string | A ref (c_…) or a phone number. |
period | string | Only orders placed in: today, yesterday, this_week, last_week, this_month, last_month, this_year, last_N_days (e.g. last_30_days), last_N_months, "last friday", YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD. Omit for all time. |
limit | integer | How many of the latest orders to list (max 50). |
Returns: store, period, customer, orders
Answer a shopper's question from live stock answer_customer_question
Answer a shopper's question like "Black hoodie XL ache?" from live stock: availability, alternatives, bundle offers and delivery time.
| Argument | Type | Description |
|---|---|---|
question required | string | The customer's own words. |
product | string | The product slug the customer asked from, if known. |
Returns: intent, language, product, variant, available, alternatives, bundles, delivery, reply
Facebook: list posts get_posts
Retrieve the merchant's Facebook Page posts — drafts, scheduled, published, failed — and the connected Pages.
| Argument | Type | Description |
|---|---|---|
status | string: draft, queued, scheduled, publishing, published, failed, rejected, cancelled, deleted, outcome_unknown | Only posts in this state. Omit for all. |
period | string | Created in: today, last_7_days, this_month, … or YYYY-MM-DD..YYYY-MM-DD. Omit for all time. |
limit | integer | Posts per page (max 50). |
cursor | string | next_cursor from the previous page. |
Returns: pages, period, total, posts, next_cursor
Facebook: list eligible ad accounts get_ad_accounts
List the connected ad accounts and which ones can run BDT campaigns.
| Argument | Type | Description |
|---|
Returns: status, message, accounts
Facebook: list paid campaigns get_ad_campaigns
Review this store's paid campaigns, Meta state, and storefront order outcomes.
| Argument | Type | Description |
|---|---|---|
status | string: prepared, creating, paused, activating, pausing, active, failed, outcome_unknown | Filter to one saved state; omit for all. |
limit | integer | Maximum campaigns to return. |
Returns: campaigns
Facebook: prepare a paid campaign review prepare_ad_campaign
Prepare a local review for promoting one published Page post with a BDT budget and fixed duration.
| Argument | Type | Description |
|---|---|---|
account_id required | string | Meta ad account id from get_ad_accounts, only when eligible_for_campaigns is true. |
post_id required | string | Published post id from get_posts; drafts, scheduled and deleted posts cannot be promoted. |
name required | string | A clear campaign name. |
total_budget_bdt required | integer | The total lifetime spend budget in BDT, charged by Meta to the merchant account. |
duration_days required | integer | How many days the ad set should run, within the configured cap. |
Returns: campaign
Facebook: create the approved campaign paused create_paused_ad_campaign
Create the approved campaign, Bangladesh ad set, existing-post creative and ad in Meta, with every object paused.
| Argument | Type | Description |
|---|---|---|
campaign_code required | string | campaign.code returned by prepare_ad_campaign. |
plan_hash required | string | Exact plan_hash shown to the merchant for this review. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, campaign
Facebook: refresh one campaign get_ad_campaign
Refresh one saved campaign's delivery state and last-seven-day Meta metrics.
| Argument | Type | Description |
|---|---|---|
campaign_code required | string | The code returned by prepare_ad_campaign or get_ad_campaigns. |
Returns: campaign
Facebook: activate the approved budget activate_ad_campaign
Activate a fully created paused Meta campaign and begin ad delivery within its reviewed lifetime budget.
| Argument | Type | Description |
|---|---|---|
campaign_code required | string | The campaign code returned by prepare_ad_campaign. |
plan_hash required | string | The exact plan hash reviewed by the merchant. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, campaign
Facebook: stop campaign delivery pause_ad_campaign
Pause an existing Meta campaign to stop further ad delivery as quickly as Meta confirms.
| Argument | Type | Description |
|---|---|---|
campaign_code required | string | The campaign code returned by get_ad_campaigns. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, campaign
Facebook: create or publish a post create_post
Write and save a Facebook Page post in the merchant's brand voice, as a draft or published after they confirm.
| Argument | Type | Description |
|---|---|---|
page | string | The Facebook Page name. Omit when only one Page is connected. |
message | string | The post text, in the merchant's words and language. |
images | array | Public image URLs (e.g. product images); 2+ make an album post. |
link_url | string | A link to share (only when there are no images). |
hashtags | array | Added at the end of the post; with or without #, e.g. ["EidSale", "#cotton"]. |
product_code | string | The product this post promotes (code from get_products). |
mode required | string: draft, publish_now | draft: save only, nothing public. publish_now: post publicly now (asks the merchant to confirm first). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: post, status, action, confirmation_token, expires_at
Facebook: schedule a post schedule_post
Schedule a Facebook Page post for a future date and time in Bangladesh time.
| Argument | Type | Description |
|---|---|---|
page | string | The Facebook Page name. Omit when only one Page is connected. |
message | string | The post text, in the merchant's words and language. |
images | array | Public image URLs (e.g. product images); 2+ make an album post. |
link_url | string | A link to share (only when there are no images). |
hashtags | array | Added at the end of the post; with or without #, e.g. ["EidSale", "#cotton"]. |
product_code | string | The product this post promotes (code from get_products). |
publish_at required | string | YYYY-MM-DDTHH:MM in Asia/Dhaka (an explicit offset is honoured). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: post, status, action, confirmation_token, expires_at
Facebook: delete or cancel a post delete_post
Cancel a draft or scheduled Facebook post, or delete a published one from the Page.
| Argument | Type | Description |
|---|---|---|
id required | string | The post id from get_posts. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: post, status, action, confirmation_token, expires_at, removed
Facebook: check an uncertain post or campaign in Meta review_meta_outcome
Read Meta's state for a post or campaign marked outcome_unknown, changing nothing.
| Argument | Type | Description |
|---|---|---|
kind required | string: post, campaign | post or campaign. |
reference required | string | The post id (get_posts) or the campaign_code (get_ad_campaigns). |
Returns: review
Facebook: record the merchant's decision on an uncertain outcome resolve_meta_outcome
Record the merchant's decision on a reviewed outcome_unknown post or campaign.
| Argument | Type | Description |
|---|---|---|
review_code required | string | The review code from review_meta_outcome. |
evidence_hash required | string | The exact evidence_hash the merchant reviewed. |
resolution required | string: attach_receipt, mark_unresolved | attach_receipt only when review_meta_outcome offered it; otherwise mark_unresolved. |
candidate | string | For a post attach: the candidate ref (for example "c1") the merchant approved. |
note | string | Optional note when marking unresolved. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, review
Other
Start of conversation: load this store get_session_context
Load everything about this store the merchant should never have to repeat, once at the start of every conversation.
| Argument | Type | Description |
|---|
Returns: store, you, plan, brain, merchant_skills, instructions, conversation_rule, loaded
Choose the workflow for the merchant's request get_workflows
Choose which business workflow a merchant's request belongs to, and get that workflow's tools, order, confidence and rollback rules.
| Argument | Type | Description |
|---|---|---|
intent | string | The merchant's request in their own words, to rank the likely workflows. |
workflow | string: product_launch, catalog, merchandising, store_health, order_management, marketing, analytics, customer_support, inventory | The workflow you chose: returns its playbook and records the choice in the prompt trace. |
Returns: workflows, suggested, chosen, thresholds, shared_tools
Load how to work for this merchant get_workflow_skills
Load this store's working instructions for a task before you start it: core rules, the merchant's Commerce Brain and their own skills.
| Argument | Type | Description |
|---|---|---|
workflow required | string: products.create, orders.manage, reports.sales, facebook.posts, all | The kind of task about to start; "all" loads everything. |
layer | string: all, core, merchant | Only one layer (for resources); leave out to get everything. |
Returns: workflow, precedence, instructions, brain, core_skills, merchant_skills, loaded
Read the merchant's Commerce Brain get_commerce_brain
Read the merchant's Commerce Brain: the standing preferences their assistant follows in every conversation.
| Argument | Type | Description |
|---|---|---|
section | string: launch | Only part of the Brain: "launch" = launch and pricing preferences, workflow automation. |
Returns: version, store, brand_name, target_audience, brand_voice, seo_preferences, sku_format, barcode_prefix, default_category_rules, pricing_strategy, image_preferences, image_style_presets, facebook_preferences, cta_preferences, seasonal_campaigns, campaigns_now, packaging_notes, delivery_preferences, return_policy, custom_rules, market_intelligence, photography_style, bundle_preferences, workflow_automation, market_memory, storefront_placement, launch_preferences, pricing_preferences, landing_engine
Money: merchant cash and courier reconciliation get_cash_flow
See recorded merchant cash separately from courier collections, outstanding payouts and earned profit.
| Argument | Type | Description |
|---|---|---|
period required | string | A supported period, e.g. today, this_month, last_7_days or YYYY-MM-DD..YYYY-MM-DD. |
Returns: store, period, cash_flow
Money: record a direct customer receipt record_customer_receipt
Record money already received directly from a customer against one of the merchant’s orders.
| Argument | Type | Description |
|---|---|---|
order_code required | string | An owned order code obtained from get_orders. |
reference required | string | Stable 8–80 character receipt/statement reference. Reuse this exact reference for retries; never invent a new one to bypass a conflict. |
received_on required | string | Actual receipt date YYYY-MM-DD in store time. |
method required | string: cash, bkash, nagad, rocket, bank, card, other | How the merchant actually received the money. |
amount required | number | BDT actually received by the merchant, at most two decimals. |
note | string | Optional receipt or statement note. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, transaction
Money: reconcile a courier payout record_courier_remittance
Reconcile an actual courier payout with its allocated collection, withheld fees and unexplained difference.
| Argument | Type | Description |
|---|---|---|
order_code required | string | An owned order code obtained from get_orders. |
reference required | string | Stable 8–80 character receipt/statement reference. Reuse this exact reference for retries; never invent a new one to bypass a conflict. |
received_on required | string | Actual receipt date YYYY-MM-DD in store time. |
method required | string: cash, bkash, nagad, rocket, bank, card, other | How the merchant actually received the money. |
amount required | number | BDT actually received by the merchant, at most two decimals. |
note | string | Optional receipt or statement note. |
gross_amount required | number | BDT of the courier collection allocated by this statement. |
fee_amount required | number | BDT fees withheld by the courier; zero when none. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, transaction
Sales inbox: Messenger and Facebook comments get_social_inbox
Understand captured Messenger conversations and Facebook comments before helping the merchant reply.
| Argument | Type | Description |
|---|---|---|
thread_code | string | Read one thread obtained from a previous list call. Omit to list threads. |
channel | string: messenger, facebook_comment | Optional channel filter for the thread list. |
cursor | string | Opaque next_cursor from the same list or thread. |
limit | integer | Thread list size, default 20. |
Returns: threads, thread, messages, linked_orders, next_cursor
Sales inbox: prepare a customer reply for review prepare_social_reply
Prepare the exact customer reply for merchant review without sending anything to Facebook or Messenger.
| Argument | Type | Description |
|---|---|---|
thread_code required | string | Owned conversation code returned by get_social_inbox. |
text required | string | Exact customer-facing text. |
kind required | string: messenger, public_comment, private_reply | Choose a kind currently allowed by the thread reply_eligibility. |
Returns: workflow
Sales inbox: approve the reviewed reply approve_social_reply
Approve a reviewed reply plan and queue its exact message after fresh permission and eligibility checks.
| Argument | Type | Description |
|---|---|---|
thread_code required | string | Owned conversation code returned by get_social_inbox. |
workflow_id required | string | Workflow returned by prepare_social_reply; keep the same ID on retries. |
plan_hash required | string | Exact hash of the plan the merchant reviewed. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, workflow
Sales inbox: catalog choices and saved order plans get_social_order_context
Read storefront, product, variant and shipping choices for a buyer-confirmed order, and orders already linked to this conversation.
| Argument | Type | Description |
|---|---|---|
thread_code required | string | Owned thread from get_social_inbox. |
workflow_id | string | Optional exact order workflow to recover; omit for catalog choices. |
Returns: templates, linked_orders, workflow
Sales inbox: prepare a buyer-confirmed order prepare_social_order
Prepare one server-priced COD order from a written buyer confirmation without creating it yet.
| Argument | Type | Description |
|---|---|---|
thread_code required | string | Owned conversation from get_social_inbox. |
template required | string | Owned storefront slug from get_social_order_context. |
items required | array | Catalog items and exact quantities agreed by the buyer; prices are always read by the server. |
shipping required | string | Shipping option key from the selected storefront. |
customer required | object | Private details explicitly provided by the buyer. |
confirmation_message required | string | Inbound written buyer-confirmation message code from this exact conversation. |
customer_confirmed required | boolean | True only after merchant verification that the buyer agreed to these goods, total and delivery details. |
Returns: workflow
Sales inbox: approve the reviewed COD order approve_social_order
Create the exact reviewed buyer-confirmed COD order through the approved Runtime plan.
| Argument | Type | Description |
|---|---|---|
thread_code required | string | Owned conversation code returned by get_social_inbox. |
workflow_id required | string | Workflow returned by prepare_social_order; keep the same ID on retries. |
plan_hash required | string | Exact hash of the plan the merchant reviewed. |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: status, action, confirmation_token, expires_at, workflow
Workflows: analyse the market for a product research_product_market
Turn the market research you did for a product into analysed pricing and positioning the merchant can act on.
| Argument | Type | Description |
|---|---|---|
product required | string | The product researched, e.g. "Premium Herbal Hair Oil". |
request | string | The merchant's own words, e.g. "Premium Herbal Hair Oil launch koro" (starts the workflow). |
workflow_id | string | Continue this workflow (wf_…) instead of starting one. |
sources_analysed required | integer | How many shops, marketplaces or pages you looked at. |
price_points required | array | Selling prices you observed, numbers only (BDT). Used for the bands, then dropped. |
recommended_position | string: budget, mid, premium | Where you think this product fits. The Commerce Brain's positioning wins unless it is "auto". |
buy_price_estimate | object | Typical sourcing / wholesale cost you found, if any. |
merchant_buy_price | number | The merchant's own buy price, only if they said it. |
popular_variants | array | How this product is commonly sold, e.g. [{"option": "Size", "values": ["100ml", "200ml"]}]. |
keyword_opportunities | array | Search phrases buyers use (max 20). |
customer_objections | array | What buyers worry about (max 10). |
bundle_ideas | array | Bundles that would sell (max 10). |
reasoning_summary required | string | Your analysis in a few sentences: why this position and price. |
target_audience | string | Who buys this, in a phrase (remembered for related launches). |
rejected_options | array | Options you considered and rejected, e.g. "Budget pricing" (max 10). |
Returns: status, workflow_id, product, price_distribution, confidence, market_position, suggested_selling_price, suggested_compare_at_price, suggested_buy_price_range, margin_estimate_percent, popular_variants, keyword_opportunities, customer_objections, bundle_ideas, ask_merchant_for_price, conversation, market_memory, instructions
Workflows: compile a Product Blueprint before execution prepare_product_launch
Compile everything gathered so far into one Product Blueprint, without creating, publishing or changing anything a merchant can see.
| Argument | Type | Description |
|---|---|---|
workflow_id | string | The workflow from research_product_market (wf_…). Without it a new workflow starts. |
request | string | The merchant's words, e.g. "Premium Hair Oil create koro" (when starting a new workflow). |
product | object | Everything you wrote for the product. |
pricing | object | The price and where it came from; compare_at_price defaults to the Brain's markup. |
stock | object | Opening quantity, only if the merchant said it (split across variants). |
variants | object | Variant plan when this product is commonly sold in options; every combination is created. |
images | array | Images you created or the merchant sent; they become the gallery, the cover is `cover` or the first. |
publish | boolean | Default true: published right after approval. |
strategy | object | Only what the merchant decided for this product family. Leave it out to inherit the family's strategy (market_memory). |
generated | array | Which fields you wrote yourself rather than the merchant (e.g. ["name", "meta_title", "meta_description", "description", "tags", "category_name", "image"]). Shown to the merchant in their prompt trace; changes nothing else. |
Returns: status, workflow_id, blueprint, missing_inputs, quality_gate, confidence, conversation, error
Product families and the strategy a new launch inherits get_product_families
See the merchant's product families and the strategy a new product in one of them inherits: audience, tone, positioning, variants, bundles.
| Argument | Type | Description |
|---|---|---|
product | string | A product name, to find the family it belongs to and what it inherits. |
category | string | The product's category name, if known (an exact family match wins). |
Returns: families, match, inherits, never_inherited
Workflows: launch a complete product execute_product_workflow
Launch a complete product in one approved plan: content, SEO, FAQ, category, SKU, barcode, gallery, variants and publishing.
| Argument | Type | Description |
|---|---|---|
workflow_id | string | The workflow from research_product_market (wf_…). Without it a new workflow starts. |
request | string | The merchant's words, e.g. "Premium Hair Oil create koro" (when starting a new workflow). |
product | object | Everything you wrote for the product. |
pricing | object | The price and where it came from; compare_at_price defaults to the Brain's markup. |
stock | object | Opening quantity, only if the merchant said it (split across variants). |
variants | object | Variant plan when this product is commonly sold in options; every combination is created. |
images | array | Images you created or the merchant sent; they become the gallery, the cover is `cover` or the first. |
publish | boolean | Default true: published right after approval. |
strategy | object | Only what the merchant decided for this product family. Leave it out to inherit the family's strategy (market_memory). |
approval_token | string | Only after the merchant approved the plan: the token from the approval_required result. |
generated | array | Which fields you wrote yourself rather than the merchant (e.g. ["name", "meta_title", "meta_description", "description", "tags", "category_name", "image"]). Shown to the merchant in their prompt trace; changes nothing else. |
Returns: status, confidence, conversation, launch_kit, workflow_id, plan, risks, approval_token, expires_at, steps, product, readiness, error
Workflows: where a product workflow stands get_workflow
Show where a product workflow stands: what is decided, what to ask the merchant next, the plan, its publish confidence and the result.
| Argument | Type | Description |
|---|---|---|
workflow_id required | string | The workflow (wf_…). |
Returns: workflow_id, title, objective, status, decisions, plan, risks, confidence, conversation, steps, error
Compile one orchestration prompt for a workflow compile_workflow_prompt
Merge core rules, the Commerce Brain, Market Memory, merchant skills and the Workflow Registry into one prompt.
| Argument | Type | Description |
|---|---|---|
workflow required | string: product_launch, catalog, merchandising, store_health, order_management, marketing, analytics, customer_support, inventory | A Workflow Registry key from get_workflows, e.g. "product_launch". |
Returns: workflow, title, precedence, instructions, core_skills, merchant_skills, required_tools, optional_tools, required_first_step, steps, confidence_rules, loaded
Workflows: edit the working draft edit_product_draft
Change the working draft of a product launch before it is published — price, text, variants, images or stock.
| Argument | Type | Description |
|---|---|---|
workflow_id required | string | The workflow whose draft to change (wf_…). |
changes required | array | Applied in order, all or nothing. |
Returns: status, workflow_id, changed, plan, confidence, conversation
Workflows: launch many products in one queue queue_product_workflows
Plan many product launches at once, get one approval, then let FcommerceBD run them one after another in the background.
| Argument | Type | Description |
|---|---|---|
request | string | The merchant's words, e.g. "20 ta product create koro". |
items | array | The products to launch, in order. |
batch_id | string | With approval_token: the batch to run. |
approval_token | string | Only after the merchant approved: the token from the approval_required result. |
Returns: status, batch_id, summary, items, runnable, approval_token, expires_at, progress
Workflows: progress of a queued batch get_workflow_queue
Report how far a queued batch of product launches has got, item by item, with each finished product's code.
| Argument | Type | Description |
|---|---|---|
batch_id required | string | The batch (bt_…). |
Returns: batch_id, status, progress, done, failed, total, items
Workflows: undo one completed workflow rollback_workflow
Undo one completed workflow — a product launch or an applied recommendations plan — keeping every record.
| Argument | Type | Description |
|---|---|---|
workflow_id required | string | The completed workflow to undo (wf_…). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: workflow_id, steps, status, action, confirmation_token, expires_at
Marketing: launch kit for a product prepare_launch_kit
Prepare what comes after a launch: Facebook post, story and WhatsApp drafts, a launch checklist, a campaign and a bundle idea.
| Argument | Type | Description |
|---|---|---|
product_id required | string | The product's code (p_…) from create_product or get_products. |
Returns: product_id, launch_kit
What the shop should do today get_recommendations
See what FcommerceBD recommends for the shop today — restock, price, featuring, bundles and fixes — with the evidence behind each one.
| Argument | Type | Description |
|---|---|---|
source | string: merchandising, bundles, health | Only merchandising, bundles or store health recommendations. |
Returns: recommendations, counts, analysed_on
Act on recommendations through an approved plan apply_recommendations
Turn the recommendations the merchant picked into one Execution Plan, and run it only after they approve that exact plan.
| Argument | Type | Description |
|---|---|---|
codes | array | rc_… codes from get_recommendations, to plan. |
workflow_id | string | With approval_token: the plan to run. |
approval_token | string | Only after the merchant approved the plan: the token from the approval_required result. |
Returns: status, workflow_id, lines, risks, steps, approval_token, expires_at, error
Set aside recommendations the merchant does not want dismiss_recommendations
Set aside recommendations the merchant does not want, so they stop appearing on the dashboard today.
| Argument | Type | Description |
|---|---|---|
codes required | array | rc_… codes from get_recommendations. |
Returns: dismissed
Bundle offers worth making find_bundle_opportunities
Find bundle offers worth making — pairs bought together, family pairings, "Buy 2 Save" — priced by FcommerceBD.
| Argument | Type | Description |
|---|---|---|
product | string | Only bundles with this product (name, SKU or code). |
Returns: bundles, opportunities
Store Health Score and what to fix first get_store_health
Check the shop's health now: a Store Health Score out of 100 and what hurts it most, worst first.
| Argument | Type | Description |
|---|
Returns: score, grade, checked_on, counts, findings, fixable
Storefront: collections and the landing page get_collections
Show the store's smart collections, who is in each right now, and what the landing page shows.
| Argument | Type | Description |
|---|
Returns: collections, landing
Storefront: create or change a smart collection manage_collection
Create, change, pin products in, or delete a smart collection whose members follow its rules automatically.
| Argument | Type | Description |
|---|---|---|
action required | string: create, update, pin, unpin, delete | What to do. |
collection | string | update / pin / unpin / delete: the collection's slug from get_collections. |
name | string | create: the name; update: a new name. |
rules | object | create / update: the membership rules (see above). |
show_on_landing | boolean | Show it on the landing page (default true). |
is_active | boolean | Switch it off without deleting it. |
position | integer | Order on the landing page (lower first). |
product_id | string | pin / unpin: the product code (p_…). |
confirmation_token | string | Only after the merchant approved: the token from the previous confirmation_required result. |
Returns: collection, deleted, status, action, confirmation_token, expires_at
What the homepage leads with right now get_landing_plan
See what the storefront homepage leads with right now — the hero collection and banner — and which Commerce Brain rule chose it.
| Argument | Type | Description |
|---|
Returns: enabled, daypart, season, collection, banner, applied, at
Choose what the homepage leads with, for a while set_landing_override
Make the homepage lead with the merchant's chosen collection or banner until a date, or hand it back to the Brain.
| Argument | Type | Description |
|---|---|---|
collection | string | A collection slug from get_collections. |
banner | string | Banner headline, up to 160 characters. |
until | string | Last day (YYYY-MM-DD, store time); leave out for until changed. |
Returns: enabled, daypart, season, collection, banner, applied, at
Resources
Fixed views an assistant can read without choosing arguments. Each is exactly the result of the tool call it names.
| URI | What | Permission |
|---|---|---|
session://context | Everything to load at the start of a conversation: store, plan and role capabilities, Commerce Brain, published merchant skills and the instructions to follow — get_session_context. | brain.read |
orders://today | Orders placed today (Asia/Dhaka), newest first, with the count and value of all of them — get_orders with period "today". | orders.view |
reports://monthly | This calendar month so far: the sales pipeline by week, profit, and revenue against last month. The same figures as get_sales_report, get_profit_report and compare_sales for period "this_month"; each section states its dates. | reports.view |
products://best-sellers | Best-selling products of the last 30 days: units and revenue per product over revenue orders (delivered and paid), highest revenue first, top 50 — get_sales_report with period "last_30_days" and group_by "product". | reports.view |
store://brain | The merchant's Commerce Brain (brand, audience, voice, SEO, SKU, barcode, image and Facebook preferences), defaults filled in — get_commerce_brain. | brain.read |
store://launch-preferences | The merchant's product launch settings from the Commerce Brain: launch preferences (publish after approval, ask stock first, per-variant stock), pricing preferences (preferred margin, psychological pricing, premium strategy) and workflow automation — get_commerce_brain {"section": "launch"}. | brain.read |
skills://merchant | Every skill the merchant has published, for every workflow — get_workflow_skills {workflow: all, layer: merchant}. | brain.read |
skills://core | FcommerceBD's locked core skills, security rules first — get_workflow_skills {workflow: all, layer: core}. | brain.read |
skills://products.create | How to add a product for this merchant: core rules, Commerce Brain and merchant skills — get_workflow_skills {workflow: products.create}. | brain.read |
skills://orders.manage | How to handle orders for this merchant — get_workflow_skills {workflow: orders.manage}. | brain.read |
skills://reports.sales | How to report sales for this merchant — get_workflow_skills {workflow: reports.sales}. | brain.read |
skills://facebook.posts | How to write and schedule Facebook posts for this merchant — get_workflow_skills {workflow: facebook.posts}. | brain.read |
Prompts
Reusable recipes the merchant can pick in their assistant. They tell the assistant which tools to call; every number still comes from FcommerceBD.
| Prompt | What | Arguments |
|---|---|---|
weekly-sales-summary | Summarise a week of sales: orders, revenue, what still needs delivering or collecting, top products, and the change from the week before. | week — last_week (the last full Saturday–Friday week, default) or this_week (so far). |
low-stock-review | Review products that are low or out of stock, rank them by how well they sell, and propose what to restock. | category — Only this category (slug). Omit for all products. |
revenue-overview | Revenue and profit for a period, the trend inside it, and the change from the period before. | period — this_month (default), last_month, last_30_days, this_year, YYYY-MM-DD..YYYY-MM-DD, … |
Example conversations
Merchant: Show today's orders.
Assistant calls
get_orders {"period": "today"}and answers: "You have 4 orders today (25 Sep 2026), worth ৳3,850 — 3 pending, 1 confirmed…"
Merchant: Create a Premium Cotton T-Shirt for 699.
Assistant calls
create_product {"name": "Premium Cotton T-Shirt", "price": 699}: "Created as a draft with 0 in stock. Want me to set the stock and put it on sale?"
Merchant: Schedule this Facebook post tomorrow at 8 PM: "Eid collection drops tonight!"
Assistant calls
schedule_postand getsconfirmation_required: "Schedule on 'Rina Fashion BD' for Saturday 26 Sep, 20:00 — OK?" Merchant: Yes. The assistant repeats the call with the token: "Scheduled."
Merchant: Compare this month's revenue with last month.
Assistant calls
compare_sales {"period": "this_month", "compare_to": "last_month", "metric": "revenue"}: "৳3,500 so far (1–30 Sep) vs ৳4,000 in August (1–31 Aug), down 12.5%."
Amounts above are illustrations; real answers use the store's own data.
Security and limits
- The merchant and store come from the OAuth token. A token can never reach another store.
- Every call re-checks the account's role and permissions; accounts on an expired or pending plan can read but not change data.
- Public or hard-to-undo actions (publishing, scheduling or deleting a Facebook post, archiving a product, cutting stock by more than 20%) always ask the merchant first.
- Every call is audited with the channel
mcp; values and secrets are never logged. - No passwords, payment details, provider keys or integration credentials are ever exposed to an assistant. There are no delete tools for products, orders or customers, and no billing, team or credential tools.
- The merchant can disconnect at any time; revoking the connection stops access immediately.