Skip to main content

Order acceptance check

Every 15 minutes, checks new and draft orders for wrong prices, unusual quantities and duplicate PO numbers. Each order that needs a look gets a ticket in the Action Hub, before the order is processed.

Runs: Outside Propeller · Trigger: Schedule · Difficulty: Medium

What you need​

  • An n8n account. See Set up n8n.
  • A Propeller API key.

How it works​

The workflow reads the orders created in the last hour in the statuses listed in CHECK_STATUSES (default NEW and DRAFT_ORDER). For each order it checks:

  • Price. Each line price is compared with the price Propeller calculated for this customer when the order was placed. That price comes from your own price setup, so the check works with any pricing strategy: list price minus discount, cost plus, price sheets or bulk prices. A line priced below its cost price is flagged too, when a cost price is known.
  • Quantity. A quantity below the product's minimum quantity, or far above or below what this customer usually orders of the product: by default 10 times, based on at least 3 earlier orders.
  • Duplicates. The same PO reference on an older order of the same customer in the last 60 days, or the same products and quantities placed less than 4 hours before.

Each order with an issue gets one ticket that names every line and what is wrong. It goes to the backoffice user in ASSIGN_TO_ADMIN_USER_ID, or else to the order's account manager. An order that already has a ticket from this workflow is never flagged twice.

Install it​

  1. In n8n, import the downloaded JSON as a new workflow.
  2. Create a header auth credential with your Propeller API key and select it on the GraphQL nodes.
  3. In the Settings node, set CHECK_STATUSES to the statuses your new and draft orders get, HISTORY_STATUSES to the statuses of real orders and ASSIGN_TO_ADMIN_USER_ID to the backoffice user who gets the tickets.
  4. Run the workflow once manually and check the Action Hub.
  5. Activate the workflow.
Filling in your API key

In n8n, create a credential of type Header Auth and fill in its two fields exactly like this:

FieldWhat to fill in
NameapiKey
ValueYour Propeller API key

Name is not a title you pick yourself. It has to say exactly apiKey, otherwise the workflow cannot sign in. See Set up n8n for the full steps.

Make it yours​

  • Sensitivity: PRICE_TOLERANCE_PERCENT, QUANTITY_FACTOR, MIN_HISTORY_ORDERS, DUPLICATE_DAYS and DOUBLE_ORDER_HOURS in Settings.
  • Order multiples: set UNIT_IS_ORDER_MULTIPLE to true only if the unit field of your products means "order in multiples of".
  • Put orders on hold: set HOLD_STATUS to the status an order with an issue should get. Which status changes are allowed is set per order status in Propeller, so create the status and allow the change from your checked statuses first. The ticket says whether the hold worked. See Order statuses.

Limits​

The customer's usual quantity is based on their latest 100 orders of the last 180 days. A run checks at most 1,000 new orders. The cost price check is skipped for orders with a currency conversion.

A run that takes longer than one hour is stopped and shows as canceled in the n8n executions list.

Use it outside n8n​

Copy the JSON into an AI assistant and follow Adjust a workflow with an AI assistant.

Good to know

The workflows and agents in the Agent Hub are free to use and adapt. They are examples, not supported product features, so test them in a staging environment and check the results before using them in production.