All integrations authenticate via Token-Based Authentication (TBA) through RESTlet endpoints deployed on NetSuite.
| Document | Direction | Description | Auto-Create |
|---|---|---|---|
| 850 Purchase Order | Inbound | Customer PO creates Sales Order in NetSuite | Yes — Sales Order |
| 810 Invoice | Outbound | NetSuite Invoice sent to customer on fulfillment | Auto-generated |
| 856 ASN | Outbound | Advance Ship Notice with tracking and lot details | Auto-generated |
All RESTlets are deployed as SuiteScript 2.1 scripts with Token-Based Authentication (TBA). Base URL: https://{accountId}.restlets.api.netsuite.com/app/site/hosting/restlet.nl
| Method | Endpoint | Script ID | Description |
|---|---|---|---|
| GET | /item/{id} | customscript_gfs_item_api | Item lookup with pricing and inventory |
| GET | /inventory/{item}/{location} | customscript_gfs_inv_api | Real-time stock check by item and location |
| POST | /order | customscript_gfs_order_api | Create a new Sales Order |
| POST | /receipt | customscript_gfs_receipt_api | Record an Item Receipt against a PO |
| GET | /customer/{id}/balance | customscript_gfs_arbal_api | Customer AR balance and aging |
| POST | /frosty/chat | customscript_gfs_frosty_api | Frosty AI natural language query |
Returns item details including description, UOM, base price, active price brackets, and on-hand inventory across all locations.
Returns real-time inventory for a specific item at a specific location. Includes on-hand, committed, available, and on-order quantities.
Creates a new Sales Order in NetSuite. Validates customer credit, checks inventory availability, and applies active price brackets automatically.
Records an Item Receipt against an existing Purchase Order. Creates lot records, captures dock temperature, and updates inventory quantities.
Returns the customer's current AR balance with aging breakdown by bucket (current, 1-30, 31-60, 61-90, 90+).
Frosty AI endpoint accepts natural language queries about inventory, orders, pricing, and customer data. Routes through Claude AI for query interpretation and returns structured data from NetSuite.
NetSuite User Event scripts fire outbound webhook notifications to Cloudflare Workers on key business events. Each webhook includes a retry policy and dead letter queue for failed deliveries.
Visual timeline showing when each automated data sync runs across a 24-hour cycle. All times are Eastern Time (ET). Real-time integrations (webhooks, API calls) are not shown as they fire on-demand.
| Sync Job | Frequency | Time (ET) | Duration | Direction |
|---|---|---|---|---|
| Bank Reconciliation | Daily | 6:00 AM | ~3 min | Inbound (BAI2) |
| Compliance Expiry Check | Daily | 7:00 AM | ~1 min | Internal scan |
| Zoho CRM Contact Sync | Every 30 min | 7AM–6PM | ~45 sec | Bidirectional |
| EDI Document Poll | Every 15 min | 24/7 | ~30 sec | Bidirectional |
| CME Price Feed | Daily (M–F) | 3:30 PM CT | ~2 min | Inbound |
| Positive Pay Upload | Daily | 4:00 PM | ~1 min | Outbound (CSV) |
| Inventory Snapshot | Daily | 11:00 PM | ~5 min | Internal capture |
| Dropbox File Backup | Daily | 2:00 AM | ~8 min | Outbound |
| Code | Name | Description | Auto-Retry | Resolution |
|---|---|---|---|---|
| GFS-E001 | Auth Failure | TBA token expired or invalid | No | Regenerate token pair in NetSuite |
| GFS-E002 | Rate Limited | Exceeded 10 req/sec RESTlet limit | Yes (30s delay) | Automatic backoff and retry |
| GFS-E003 | Record Locked | Target record being edited by another user | Yes (5s delay) | Retry up to 3 times, then DLQ |
| GFS-E004 | Validation Failed | Required fields missing or invalid data types | No | Fix payload, resubmit manually |
| GFS-E005 | Timeout | RESTlet execution exceeded 300s | Yes (60s delay) | Retry once, split batch if needed |
| GFS-E006 | Credit Hold | Customer on credit hold, order blocked | No | Review AR balance, release hold |
| GFS-E007 | Inventory Short | Requested quantity exceeds available stock | No | Adjust order quantity or backorder |
| GFS-E008 | EDI Reject | Trading partner rejected document (997) | No | Review 997 details, fix and resubmit |
| GFS-E009 | Feed Unavailable | External data source not responding | Yes (5m delay) | Use last known good value, alert ops |
| GFS-E010 | DLQ Overflow | Dead letter queue exceeds 100 entries | N/A | Immediate page to on-call engineer |
Failed integration payloads are stored in a Cloudflare D1 SQLite table for manual review and reprocessing. Each DLQ entry includes the original payload, error details, timestamp, and integration source.