DaletGuard supports civilians affected by armed conflict through Families Beyond War. All sides, no political affiliation. About our humanitarian work

Marketplace Order Intake: Webhooks vs Polling

An order that reaches you late is a stock problem, and one that reaches you twice is an accounting problem. An order that never arrives at all is a customer problem for your whole support team to solve at once. Marketplace order intake is the step that decides which of these three problems you get on any single busy day. DaletMart, a commerce back office inside your CRM, supports polling and webhooks, so each route can cover the other's weakness. This article compares both routes, and it explains how a webhook signature check, duplicate protection and the retries all work.

You can ask each channel for new orders on a schedule, or let the channel call you when something changes. Also, the article also states what is proven and what is not. The guide to multichannel commerce operations explains how intake relates to stock and returns.

Illustration of gift, document, shield for marketplace order intake
Key takeaway

Marketplace order intake works well with both routes: polling as the steady backstop and webhooks for speed. Verify every webhook signature over the raw body, key every order by its external id so repeats change nothing, and cap retries so a bad event cannot loop forever.

Which two ways can an order get into the system for you?

Next, polling means your system asks. A worker visits each channel on a timer and requests orders since the last visit. Indeed, it is simple to reason about, because you control the schedule. The polling worker keeps its own last sync time for each channel.

It is also late by design. Besides, an order can wait for the whole interval before you see it.

A webhook means the channel tells you. The channel sends a request to a public address when an order is created, changed or cancelled. Overall, a webhook is fast. Marketplace order intake by webhook is fast.

But anyone can send a request to a public address, so a webhook needs proof of origin. A webhook signature proves that the request came from the channel.

It can also fail silently if the channel gives up after a few tries. In fact, marketplace order intake has to plan for that.

Why do so many teams use both of the two routes?

Each route covers the other's weakness. As a result, webhooks give speed, and polling gives certainty. Thus, if a webhook is lost, the next poll finds the order.

For example, if a poll is slow, a webhook brings it in sooner. A polling worker closes the gaps that a webhook leaves.

The cost is that the same order can arrive twice, which is why the next sections matter. A polling worker and a webhook can both deliver it.

Marketplace order intake is therefore mostly a question of duplicates and proof. Instead, speed is the easy part. Marketplace order intake is a design problem, not a speed problem.

DaletMart Queue: Webhook signature screen

How does DaletMart poll each channel for its new orders?

For polling-based marketplace order intake, an order-puller worker visits each active channel. Hence, it skips archived channels and the built-in test tenant. For each channel it asks the connector for orders since the channel's last sync time.

Therefore, on the first run, it looks back one day. The polling worker is the steady backstop of the design.

For every order returned, the worker looks for the same external order id on that tenant and channel. If one exists, the worker skips it. A marketplace often settles fees after an order is created, so the first fee can be zero.

Moreover, when a later pull reports a non-zero fee, the worker fills in that field only. The polling worker never creates a second row for the same order. Next, the external order id is stored on every order.

A new order is created with its lines. The worker then resolves the buyer to a customer before committing, and acknowledges the order to the channel. In addition, a failure in the buyer step is logged and does not drop the order.

The whole record stays visible in the order record. The external order id travels with the order lines. Marketplace order intake ends in one visible record.

Order preview panel listing order ID, status, channel, buyer, total, date and order lines
Product view: an order preview opens beside the list without losing your place.

Also, the preview above shows what an operator sees after marketplace order intake. Lines, buyer and status sit beside the list. Therefore, you can check an imported order without leaving your place.

How does a webhook get in, and what is checked first?

For webhook marketplace order intake, each channel has its own address, made of a marketplace slug and a channel id. Thus, the receiver works through a fixed series of checks before it stores anything.

  1. Find the channel: An unknown or archived channel gets a 404 response.
  2. Match the slug: The slug must match the channel's connector, or the request gets a 403.
  3. Read a bounded body: The body streams into a capped buffer. The cap in code is 1,048,576 bytes, so a chunked request cannot sneak past it.
  4. Verify the signature: The connector checks the signature over the raw bytes. A bad signature gets a 403.
  5. Parse the JSON: The body must be a JSON object, or the request gets a 422.
  6. Refuse card data: A payload that contains payment card data is rejected with a 422.
  7. Store and acknowledge: The event is stored, and the sender gets an event id back.

Notice what the receiver does not do. Also, it does not echo your payload back, and it does not need a bearer token. It relies on the per-channel address and the signature.

Thus, the page on data security and isolation puts that choice in context. Marketplace order intake by webhook has a fixed series of checks.

Why do all of the connectors set their own check?

The default check is fail-closed. Next, Unless a channel's credentials explicitly allow unsigned webhooks, an unverified request is rejected. Indeed, connectors then override the default with their own method, such as a provider-specific HMAC. Marketplace order intake fails closed by default.

Every webhook signature is verified over the raw bytes. A webhook signature method can therefore differ by provider.

A file count in the code shows 13 cart modules, 53 marketplace modules and 3 POS modules. Each has its own verifier. Indeed, the built-in test connector has one too. Each of those verifiers checks a webhook signature.

That is a count of code, not proof that every provider sends webhooks. Besides, three carts, osCommerce, VirtueMart and Zen Cart, connect through their plugin only. Treat webhook support as a per-channel question.

Overall, Shopify privacy topics get special care. For those, the generic log stores only a digest of the body, not the personal data request itself.

DaletMart Workflow: Find the channel screen

How do retries work when an event fails to process?

A stored event is not an order yet. In fact, a separate processor picks it up and asks the connector to parse it. It handles three event kinds: order created, order updated and order cancelled.

Besides, retry limit logic applies to this processor. Marketplace order intake has a second stage.

Created and updated events insert or update an order, and webhook orders carry the source value webhook. As a result, a cancellation finds the order by external id and cancels it. An event type that the connector does not handle is marked processed and logged. The external order id finds the order for a cancellation.

For example, when processing fails, the event retries. After five failed tries it is marked failed. Instead, this retry limit matters a great deal.

Without it, one malformed event could loop without end and delay everything behind it. The retry limit is five failed tries.

Hence, listing pushes follow a related pattern. Their delays grow from 5 seconds to 30 seconds, 5 minutes, 30 minutes and 2 hours, and then they stop. Those delays belong to pushes, not to webhook events.

As a result, do not mix them up when you read logs. A retry limit also applies to listing pushes.

How can the external order id stop a repeat order?

Therefore, the external order id is the key to duplicate protection in marketplace order intake. Overall, Whichever route brings an order, the code looks up the tenant, the channel and that id. The external order id is therefore the key for both routes.

Moreover, found means update or skip. A missing order means insert. In addition, a repeat delivery therefore has no effect.

Choose any design for marketplace order intake with this rule in mind. Also, a key you control beats a promise that the channel never repeats itself. Marketplace order intake designs should assume repeats.

Illustration for Marketplace Order Intake: Webhooks vs Polling

How does order source tracking show how orders got in?

Source tracking makes marketplace order intake visible. Thus, every order carries a source field. It defaults to marketplace order, and webhook orders carry webhook. The polling worker sets the default source value.

The source filter on the orders list lets you compare the two routes. In fact, if one channel shows only webhook orders, polling may be failing. If it shows only polled orders, webhooks may not be reaching you. Marketplace order intake health shows up in that filter.

Marketplace order intake also feeds stock. An order that arrives late is a unit that sold without a hold. Size your buffers with that delay in mind. A webhook signature failure never reaches the stock ledger.

Read the page on the inventory ledger to see how sales reach the count. Returns arrive by their own route, described in the returns process.

What do tests prove, and what is not yet proven?

Our 146 commercial connectors have run only against mock transport in offline tests. None has met a real provider sandbox or account. As a result, real webhook timing, provider retry rules and signature formats are therefore untested in production. The connectors page sets out that boundary.

Example scenario: a made-up shop with two channels, and no result claimed. Channel one sends webhooks, and channel two does not.

The team lets the poller run on both and watches the source filter for a week. They find that channel two orders all arrive by polling, as expected. Channel one shows both, which tells them the poller is catching the odd missed webhook.

How should you build intake for repeats and late messages?

Good marketplace order intake assumes that messages arrive twice, late or not at all. Use polling as the steady backstop and webhooks for speed. Verify every signature over the raw body, key every order by its external id and cap every retry. Use a retry limit so that no event loops without end.

Then prove your marketplace order intake on your own channels. Run a sandbox test with a few channels, read the source filter and compare order counts against each channel's portal. Return to the operations guide to see how intake connects to stock, returns and buyer records. Check each webhook signature, each retry limit and the polling worker.

Also, the article on allocation modes and buffers covers how stock is shared once orders arrive.

A diagram with the topic at the centre and four connected parts: Webhook signature, Polling worker.

Questions and answers on this topic from the product team

Should I choose webhooks or polling?

Use both if the channel supports both. Webhooks bring orders quickly, while polling catches anything a webhook missed. If a channel supports only one route, plan around its weakness.

How does DaletMart avoid duplicate orders?

Both routes look up the external order id for the same tenant and channel. If that id is already stored, the polling worker skips it, and the webhook route updates it. A repeat delivery therefore changes nothing.

What happens when a webhook signature is wrong?

The request is refused with a 403 response and nothing is stored. Unsigned webhooks are rejected by default unless channel credentials explicitly allow them. Confirm the signature method for every channel you plan to use.

How many times does DaletMart retry a failed webhook event?

A stored event is retried up to five times, then marked failed and left for an operator to read. This limit stops one bad event from looping forever. A failed event does not retry again on its own.

Do all marketplaces support webhooks?

No, and this package does not claim they do. Some plugin-only carts connect through their plugin instead. All 146 commercial connectors are tested offline only, so confirm each channel's real behavior in a sandbox run.

See how DaletMart fits the providers your team uses today

Book a short meeting for a walkthrough with your own providers in mind, or join an in-person class to learn the method first.