The loop
Every connector, regardless of destination, runs the same loop:1
Poll for pending records
Ask MerchantOps for records that have been approved and routed to your
target but not yet reported as done.
2
Transform
Map each MerchantOps record onto whatever shape your system expects
(field names, units, identifiers).
3
Push to your system
Write the record into your destination — call its API, update your
database, drop a file, whatever your system needs.
4
Report the outcome
Tell MerchantOps whether each record succeeded, failed, or was skipped.
Reported records drop out of the next poll; unreported ones come back so you
can retry. Re-sending an outcome you already delivered is safe — see
Retries and idempotency below.
Setup
1
Register the target
In Settings › Publish Targets, add an integration for your custom
target with a target key (for example
custom) and a poll delivery
mode. No credentials for your system are stored on the MerchantOps side —
your connector authenticates to your system itself.2
Create an API key with a role that grants the connector permissions
The connector API is gated on two permissions:
Settings › API Keys has no scope picker. You create a key and assign it
one or more roles, and the key inherits whatever permissions those roles
bundle. Roles themselves are defined for your organization by MerchantOps,
not in the app.The standard Owner / Admin / Editor / Viewer roles don’t include the
connector permissions — so unless your organization already has a
purpose-built connector role, ask your MerchantOps contact to set one up
bundling the two permissions above, then assign it when you create the key.
The poll endpoint accepts either permission; reporting an outcome
requires
pricing.publish.outcome:write specifically. A read-only
monitoring key can therefore be granted only
pricing.publish.outcome:read.3
Run your connector
Your service holds the key and calls MerchantOps over HTTPS with:The key is organization-scoped — your connector only ever sees records that
belong to your organization.
Poll for pending publishes
Request the records routed to your target that haven’t been reported yet:limit records with the fields you need to publish
them:
batch_key is the batch this delivery belongs to — the one whose progress your
outcomes advance. For a batch that re-delivers existing price records (a
republished batch, or one promoted to another environment) that is the batch
being published now, not the batch the record was originally created in.
Report an outcome
For each record, POST back what happened:string
required
The target you configured (for example
custom).string
required
One of
success, failed, or skipped. All three are terminal: the record
is done for this run, drops out of the next poll, and counts toward the
batch’s completion.Use skipped when the record simply does not apply to your system — nothing
went wrong, but nothing was published either. A skip is never counted as a
publish, so it weighs against the batch’s success ratio exactly like a
failure: a batch where more than 5% of records are skipped finishes as
Partial, not Published.number
The HTTP status or internal result code your system returned. Helps debugging.
number
How long your call took.
number
1 for a first-try success; higher if you retried.string
A short failure summary — shown in the publish status UI when the status is
failed.string
The record’s ID in your downstream system, if it has one.
boolean
Whether this POST advanced the batch and job counters.
true on the first
report for a record in a publish run. false when the outcome was already
counted for that run (your retry was deduplicated) or when the record does not
belong to a batch — in both cases the outcome is still stored and visible, it
just doesn’t move the counters a second time.string | null
null while other records in the batch are still outstanding, and
"published" or "partial" when your outcome is the one that completes the
batch. See batch-level rollup for which of the
two you get.Retries and idempotency
Your connector owns its retry logic entirely. A record stays pending until you POST a terminal outcome, so if your connector crashes mid-run, the record is still pending on the next poll — just pick it up again. Outcome POSTs are counted once per record per publish run. Re-sending an outcome after an ambiguous response (a timeout, a dropped connection) is safe: the visible outcome is refreshed with whatever you send, the batch and job counters do not move again, and the response comes back with"counted": false
so an at-least-once connector can see that its redelivery was deduplicated.
Don’t infer delivery from a record’s absence in one poll response.
pending-publishes is capped by limit and has no cursor, so on a batch larger
than limit a record can be missing from a page simply because it didn’t fit.A minimal connector
The whole contract fits in one loop:What you get
- Isolation. Your connector talks to MerchantOps only over HTTPS. No shared infrastructure, no special client libraries.
- Org scoping. Your key can only read and update your organization’s records — there’s no way to affect another tenant.
- The same monitoring surface. Your publishes appear in publish status exactly like built-in connectors: per-target breakdown, per-record outcomes, job progress, and the batch-level rollup to Published or Partial once every record has reported.
Next steps
VTEX (reference connector)
A worked example of a built-in connector for catalog and pricing.
Reading publish status
See where your connector’s outcomes show up.