Crossly Customers integrations
Latest: v1.0.0
Initial release
Crossly customers, CRM and notification destinations
Crossly has no customer table. A customer is every order grouped by lower(buyer_username), across all marketplaces: vintagefan on Poshmark and vintagefan on Depop are one customer. The handle is the key; there is no Crossly customer id, and two different people who share a handle on different marketplaces merge. What you can write is your own layer on top (notes, blocklist, CRM pushes). Auth: see the crossly-api-setup skill; pagination, errors and idempotency: crossly-api-conventions.
Setup
- Create a free Crossly account: https://crossly.net/register
- Create a personal access token at https://crossly.net/settings/api/tokens/new (guide: https://crossly.net/guides/personal-access-tokens). Use a
crossly_pat_test_token against the sandbox while building. - Export it as
CROSSLY_PATand send it asAuthorization: Bearer $CROSSLY_PATtohttps://crossly.net/api/v1/*. Full docs: https://crossly.net/docs
Scopes
| Endpoints | Scope |
|---|---|
GET /v1/customers, GET /v1/customers/{handle} | orders:read (not customers:read) |
GET /v1/customers/{handle}/notes, POST /v1/customers/bulk-export | customers:read |
PUT /v1/customers/{handle}/notes, POST /v1/customers/{handle}/refresh-profile, POST /v1/customers/bulk-delete | customers:write |
| Loyalty members, points, invites (below) | customers:read / customers:write |
GET /v1/crm/integrations, GET /v1/crm/integrations/{id}/logs, GET /v1/integrations | integrations:read |
| CRM create / edit / delete / test, email senders | integrations:write |
Notification destinations (/v1/webhooks with a kind) | webhooks:read / webhooks:write |
Deprecated /v1/notification-integrations | integrations:read / integrations:write |
List and read customers
import { createClient } from '@crossly/sdk';
const crossly = createClient({ pat: process.env.CROSSLY_PAT! });
// GET /v1/customers?search=denim&page=1&limit=25 (limit max 100, default 25)
const { data } = await crossly.customers.list({ search: 'denim', limit: 100 });
for (const c of data) console.log(c.normalizedHandle, c.totalOrders, c.totalSpent, c.platforms.join(','));
// GET /v1/customers/{handle}
const detail = await crossly.customers.get('denimhead_kc');
curl -sS "https://crossly.net/api/v1/customers?limit=100&page=1" -H "Authorization: Bearer $CROSSLY_PAT"
The list accepts only search (substring of the handle), page and limit, and is always sorted best customers first (most orders). The dashboard's repeat-only, min-spend, platform and date filters are not exposed on /v1: filter the pages yourself.
| List row field | Notes |
|---|---|
normalizedHandle | lowercased buyer username, the key for every other call |
platforms | marketplaces this handle bought on |
totalOrders, totalSpent | lifetime; totalSpent is a dollar number (sum of sale prices) |
firstOrderAt, lastOrderAt | ISO timestamps |
avatarUrl, displayName, bestRating | best buyer profile found (bestRating: { value, count, platform } or null) |
GET /v1/customers/{handle} returns normalizedHandle, platforms, totalOrders, totalSpent, orders (the 50 most recent: id, platform, platformOrderId, buyerUsername, status, salePrice, createdAt), contact (name, email, phone, address where the marketplace shares them; most share only the username, eBay shares more), profiles (one public buyer profile per marketplace), stats (lifetime: orders, spend, cancellations, returns, disputes, messages, offers) and notes / notesUpdatedAt. totalOrders, totalSpent and stats are over all orders, not only the 50 returned. Handles are case-insensitive; URL-encode them. A handle with no orders answers 404 not_found.
Orders with no buyer username are not in the aggregate. For a shipping address use the order itself (GET /v1/orders/{id}, see crossly-orders-sales).
Notes, profile refresh, blocklist, export
await crossly.customers.setNotes('denimhead_kc', 'Prefers bundles. Ships to a PO box.', { idempotencyKey: crypto.randomUUID() });
const { notes } = await crossly.customers.notes('denimhead_kc'); // '' when none
// 202: one forced profile read per marketplace they bought on; read get(handle).profiles later
const { platforms } = await crossly.customers.refreshProfile('denimhead_kc', { idempotencyKey: crypto.randomUUID() });
// platforms: [{ platform, queued, reason }]
PUT /v1/customers/{handle}/notes{ notes }: up to 5000 characters; an empty string clears. One note covers the buyer on every marketplace, and it works before the buyer's first order (GET .../notesneeds no orders).POST /v1/customers/{handle}/refresh-profile: rate limited to 10 a minute per seller, because each job reads a marketplace through the seller's own session.POST /v1/customers/bulk-delete{ handles }(1-500): blocklists the handles. Orders and analytics are untouched; the buyer is hidden from the customer view and future aggregation. Answers{ ok, deleted }.POST /v1/customers/bulk-export{ handles }(1-2000): returns a CSV file (text/csv,crossly-customers-YYYY-MM-DD.csv) with columnshandle, platforms, total_orders, total_spent, last_order, first_order, not JSON. The SDK'sbulkExportreturns the CSV text despite itsJsonObjecttype.
curl -sS -X POST https://crossly.net/api/v1/customers/bulk-export \
-H "Authorization: Bearer $CROSSLY_PAT" -H "Content-Type: application/json" \
-d '{"handles":["denimhead_kc","vintageaffair"]}' -o customers.csv
There is no segments resource for customers. Segment by paging the list (or by GET /v1/analytics/segments for sales segments, see crossly-analytics-profit), and tag buyers inside workflows with the customer.tag node.
CRM connections
A CRM connection belongs to a store (send X-Storefront-Id, else the default store; see crossly-team-stores).
provider | How it connects | config |
|---|---|---|
custom | API | url (https, required), method (POST, PUT, PATCH; default POST), headers (your auth), bodyTemplate (JSON text with {{customer.field}} placeholders, e.g. handle, email, name, phone, platforms; strings are inserted already quoted, so don't wrap them in quotes), hmacSecret (optional, signs each request) |
mailchimp | API | apiKey (ends in the data centre, e.g. -us21), listId (the audience id) |
hubspot, salesforce, pipedrive, zoho | Browser sign-in in Settings → Integrations only. POST refuses them with 400 validation_error; once connected they can be edited, tested, paused and removed here. |
sync (optional) decides which buyers flow in automatically: sources (any of orders, wholesale_buyers, lookbook_optins, group_buys, loyalty; empty = manual pushes only), marketingConsentOnly (default true: only buyers who opted in to marketing) and fieldMap (Crossly field to CRM field, keys up to 40 characters, values up to 80; ignored for custom, whose bodyTemplate does the mapping). name is 1-80 characters.
const { data: crm } = await crossly.crm.create({
provider: 'custom',
name: 'Our CRM',
config: {
url: 'https://crm.example.com/hooks/crossly',
headers: { Authorization: 'Bearer REPLACE_WITH_YOUR_CRM_TOKEN' },
bodyTemplate: '{"email": {{customer.email}}, "handle": {{customer.handle}}}',
},
sync: { sources: ['orders'], marketingConsentOnly: true, fieldMap: {} },
}, { idempotencyKey: crypto.randomUUID() });
await crossly.crm.test(crm.id); // sends a sample buyer, one sanitized result line
const log = await crossly.crm.logs(crm.id, { status: 'failed', pageSize: 50 });
Other calls: PATCH /v1/crm/integrations/{id} (crossly.crm.update: rename, enabled: false to pause, re-key, change sync; blank secrets keep the stored ones), DELETE /v1/crm/integrations/{id} (buyers stop flowing and its delivery log is deleted with it), GET /v1/crm/integrations/{id}/logs (page, pageSize 1-100 default 25, status pending / sent / failed / retrying). Secrets come back redacted. Config errors are 400 validation_error with a message meant for the seller ("Add the https:// address your CRM receives buyers at."); an unknown id is 404 not_found.
To push buyers continuously, use the crm.push_buyer step in a workflow or automation rule (integrationId = the CRM connection id), for example on a sale. See crossly-workflows and crossly-automation-recipes. GET /v1/integrations (crossly.aiIntegrations.overview()) lists every connected integration of the store (AI keys, CRMs, email senders, design apps) as uniform rows.
Notification destinations for notify.* steps
Slack, Discord and JSON destinations are webhooks with a kind now. Create them with POST /v1/webhooks and eventDelivery: false so they receive only messages from automation steps, not every event. Kinds: json (signed; the secret is returned once), slack, discord, teams, telegram (botToken, chatId), google_chat, mattermost, zapier; GET /v1/webhooks/types lists each kind's fields and allowed hosts.
const slack = await crossly.webhooks.create(
{ kind: 'slack', name: 'Sales channel', url: 'https://hooks.slack.com/services/REPLACE/ME/PLEASE', eventDelivery: false },
{ idempotencyKey: crypto.randomUUID() },
) as { id: string };
await crossly.webhooks.test(slack.id);
curl -sS -X POST https://crossly.net/api/v1/webhooks \
-H "Authorization: Bearer $CROSSLY_PAT" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
-d '{"kind":"discord","name":"Alerts","url":"https://discord.com/api/webhooks/REPLACE/ME","eventDelivery":false}'
The webhook id is the integrationId of notify.slack, notify.discord, notify.webhook and notify.destination (any kind) steps. A step fails not_found when the id is not the seller's, and bad_param when the destination is turned off or of a kind the step does not accept (a Discord hook in notify.slack). notify.email_user, notify.telegram (the seller's linked chat), notify.push and notify.in_app need no destination. Deleting a destination makes every rule that uses it fail on its next run. Event subscriptions, signatures and deliveries: see the crossly-webhooks skill.
/v1/notification-integrations (crossly.notifications.list/create/update/delete/test, provider: slack, discord, webhook) is a deprecated alias kept for one release; it reads and writes the same webhook rows. Don't build on it.
Notification messages with buttons (approve a reprice, accept an offer, a workflow approval) carry a signed single-use token. POST /v1/notify/actions { token } (inbox:write, crossly.notifications.act(token)) decides it: 410 when the token has expired, 409 when it was already decided.
Loyalty members
Customers who join a seller's loyalty program are readable as members: GET /v1/loyalty/program/members (tier, standing, grace, overrides), GET /v1/loyalty/program/members/{id}, GET /v1/loyalty/program/members/{id}/points. Writes (customers:write): POST /v1/loyalty/program/members/{id}/override { tierId, reason } pins a tier (tierId: null clears), POST /v1/loyalty/program/members/{id}/points { points } grants points (an Idempotency-Key is required; the same key awards once; fires loyalty.points_awarded), POST /v1/loyalty/program/invite { buyerUserIds } (up to 500) after GET /v1/loyalty/program/invite-candidates. Program, tiers and rewards set-up belong with discounts: see the crossly-storefront-shop skill.
Rules
- Key everything on
normalizedHandle, lowercased and URL-encoded. Never assume a handle is one human. - List and detail need
orders:read; notes and export needcustomers:*. Ask for both when you build a CRM sync. bulk-exportreturns CSV, not JSON; batch at most 2000 handles, and 500 forbulk-delete.- Respect
marketingConsentOnly(default true) when pushing buyers to marketing tools, and don't log buyer contact data. - New Slack/Discord/JSON targets go through
POST /v1/webhookswithkindandeventDelivery: false, not/v1/notification-integrations. - Use placeholder secrets (
REPLACE_WITH_...) in shared examples; never paste a real CRM key or chat webhook URL. - Send an
Idempotency-Keyon every write; points grants require one.
Docs: https://crossly.net/docs/customers · https://crossly.net/docs/api-customers · https://crossly.net/docs/notifications · https://crossly.net/docs/api-webhooks · https://crossly.net/docs/automation-rules · https://crossly.net/docs/discounts-and-loyalty
