Skip to main content
Tranthor’s Node.js SDK. Use it to send events to Tranthor, AI-native CRM for ecommerce brands.

Installation

Usage

Delivery

Events are sent in batches to https://api.tranthor.com. init and initNew also accept these options: Network errors, a request that gets no answer within 10 seconds, and HTTP 408, 425, 429 and 5xx responses are retried; a Retry-After header is honoured (up to 30 seconds per retry). Other statuses, such as an invalid write key (401), are dropped after one attempt and reported through onError. await TranthorSdk.flush() sends everything queued and rejects if a batch was dropped. If a batch still fails with a retryable error after all its retries, flush() rejects at once and the remaining events stay queued for the next flush interval, so call it before the process exits and flush again if it rejects.