How to Publish New NetSuite Items as Draft Products in BigCommerce
Build a Spojit workflow that checks NetSuite for newly created items on a schedule and creates matching draft products in BigCommerce, with Miraxa cleaning up the titles and descriptions before they go live.
What This Integration Does
When your merchandising team adds an item in NetSuite, that record rarely arrives storefront-ready: names are written in operational shorthand, descriptions are sparse or full of internal codes, and nobody wants to hand-key each product into BigCommerce. This workflow closes that gap. On a schedule it finds the items created in NetSuite since the last run, asks Miraxa to rewrite each one into a clean storefront title and description, and creates the product in BigCommerce as a draft so a human can review and publish it. Your catalog stays in sync without manual data entry, and nothing goes public until someone says so.
The run model is schedule-driven and stateless between runs. A Schedule trigger fires on your chosen cron expression, the workflow queries NetSuite with a SuiteQL query bounded by a creation-date window, loops over each new item, and writes a draft product into BigCommerce. Because new drafts are created (not upserted), the safest way to avoid duplicates is to make the date window line up with the schedule interval, or to look up the SKU in BigCommerce before creating. Re-running the workflow over the same window would create duplicate drafts, so keep the window tied to the cadence.
Prerequisites
- A NetSuite connection in Spojit with permission to read items and run SuiteQL queries. See the NetSuite connector article for setup.
- A BigCommerce connection with API credentials that allow creating catalog products. See the BigCommerce connector article.
- A decision on which NetSuite item record type to publish (for example
inventoryItem) and which fields map to BigCommercename,sku,price, anddescription. - AI credits available in your workspace, since Agent mode and the title/description cleanup consume credits.
Step 1: Add a Schedule trigger
Create a new workflow and add a Trigger node, then set its type to Schedule. Enter a 5-field Unix cron expression and an IANA timezone. For a weekday-morning sweep, use 0 7 * * 1-5 with a timezone such as Australia/Sydney. A single Schedule trigger can hold multiple schedules if you want more than one daily run. The trigger output is { scheduledAt }, which you can use later as the reference point for your lookback window.
Step 2: Compute the lookback window
Add a Connector node in Direct mode using the date utility connector. Pick the subtract tool to roll {{ trigger.scheduledAt }} back by your schedule interval (for a daily run, subtract one day) and the format tool to produce a NetSuite-friendly date string. Store the result in a variable such as sinceDate. This value becomes the lower bound for the SuiteQL query in the next step, so only items created since the previous run are picked up.
Step 3: Query NetSuite for new items
Add a Connector node in Direct mode, choose the netsuite connector, and select the run-suiteql tool. Write a SuiteQL query that returns the items created within your window. Use the query field, and set limit to page the results:
SELECT id, itemid, displayname, salesdescription, baseprice
FROM item
WHERE itemtype = 'InvtPart'
AND created >= '{{ sinceDate }}'
ORDER BY created
FETCH FIRST 100 ROWS ONLY
SuiteQL gives you precise control over which fields and record subtypes you read, which the record-level list-items tool cannot express as tightly. If you prefer a simpler read of a single subtype, list-items with a recordType of inventoryItem is an alternative. Bind the output to a variable such as newItems.
Step 4: Loop over each new item
Add a Loop node in ForEach mode and point it at the rows returned by NetSuite, for example {{ newItems.data.items }} (match the exact path shown in your run output). Each pass exposes the current item as a loop variable, for example {{ item }}. Everything in the loop body runs once per new NetSuite item. If you expect large catalogs, keep the SuiteQL FETCH FIRST limit modest and let multiple scheduled runs work through the backlog rather than processing thousands of rows in a single execution.
Step 5: Clean the title and description with Miraxa
Inside the loop, add a Connector node in Agent mode. Agent mode lets Miraxa, the intelligent layer across your automation, reason over the raw NetSuite fields and return polished copy. In the prompt, pass the item's raw values and ask for a customer-facing title and description, and set a Response Schema so the output is reliable JSON. For example, prompt with: "Rewrite this product for an online store. Source name: {{ item.displayname }}. Source description: {{ item.salesdescription }}. Return a concise storefront title and a two-sentence marketing description. Remove internal codes." Define the Response Schema with title and description string properties and bind the result to a variable such as cleaned. Because Agent mode and the schema enforce structure, you get predictable fields to map in the next step.
Step 6: Create the draft product in BigCommerce
Still inside the loop, add a Connector node in Direct mode, choose the bigcommerce connector, and select the create-product tool. The tool takes a single product object. Map the AI-cleaned fields and the NetSuite SKU and price, and set is_visible to false so the product is created as a draft that staff review before it goes live:
{
"name": "{{ cleaned.title }}",
"type": "physical",
"sku": "{{ item.itemid }}",
"price": {{ item.baseprice }},
"description": "{{ cleaned.description }}",
"is_visible": false
}
BigCommerce rejects duplicate SKUs, so if the same item is picked up twice the create call will fail rather than silently duplicate. You can use that as a natural guard, or add a Connector node calling list-products filtered by SKU before creating, then a Condition node to skip items that already exist.
Step 7: Notify the merchandising team
After the loop, add a Send Email node so reviewers know there are new drafts waiting. Send Email uses Spojit's built-in mail service and needs no connection. Set Recipients to your merchandising distribution address, write a templated Subject such as {{ newItems.data.count }} new draft products ready to review, and in the Body point them to the BigCommerce admin to publish. Make sure external recipients are on the org allowlist under Settings -> General -> Email recipients.
Tips
- Keep the date window in Step 2 exactly aligned with your schedule cadence so every item is seen once and only once.
- Use the Response Schema in Agent mode to lock the AI output to
titleanddescriptionfields, which keeps Step 6's field mapping stable even when the source data is messy. - Start with a small SuiteQL
FETCH FIRSTlimit (for example 25 rows) while you tune the prompt, then raise it once the copy quality is right. - If you want a human gate before any draft is created, add a Human approval node before the BigCommerce step. Note that a rejection halts the run, so use approval only when stopping is the desired outcome.
Common Pitfalls
- Timezone mismatch: NetSuite stores creation timestamps in its account timezone. If your cron timezone and the NetSuite account timezone differ, the lookback window can miss or double-count items near midnight.
- Duplicate drafts: re-running the workflow over an overlapping window creates duplicate BigCommerce products. Rely on the SKU uniqueness error or a
list-productslookup with a Condition node to dedupe. - Pagination: SuiteQL returns one page per call. If a run can exceed your
FETCH FIRSTlimit, either narrow the window or page through withoffsetin a loop rather than assuming one query returns everything. - Price and field types: BigCommerce expects
priceas a number, not a quoted string. Confirm the NetSuite field you map (for examplebaseprice) is numeric, and adjust the payload if your account exposes a different price field.
Testing
Before enabling the schedule, validate on a tiny scope. Add a single test item in NetSuite, then temporarily swap the Step 2 lookback to a wide window (for example the last 7 days) and run the workflow with the Run button. Watch the execution logs to confirm the SuiteQL query returns your test item, the Agent mode node returns clean title and description values, and BigCommerce shows a new product with is_visible set to false. Once you have confirmed one item flows end to end, restore the tight lookback window, re-enable the Schedule trigger, and let the first scheduled run process real data.