Skip to main content

Churn risk alerts

Scores the companies that ordered in the last 90 days on how likely they are to stop ordering and creates a ticket in the Action Hub for the biggest risk, so a sales rep can call before the customer leaves. It runs automatically twice a week.

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

What you need​

How it works​

Every Monday and Thursday at 06:00 the workflow reads all orders from the last 90 days in the statuses listed in Settings and gives every company that ordered a churn score from 0 to 100. The score compares the last 30 days with the 60 days before:

  • ordering less often (40%)
  • spending less per order (30%)
  • no order for longer than usual (30%)

Companies with fewer than 2 orders in the 60 days before are not scored. The workflow creates a ticket in the Action Hub for the company with the highest score above 30. The ticket opens the company page and explains which signals dropped.

A company with an open churn ticket, or a churn ticket from the last 30 days, is skipped. Tickets from the earlier version of this workflow count too.

If the orders cannot be read completely, the run stops with an error. You never get a ticket based on missing orders.

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 five GraphQL nodes.
  3. In the Settings node, set ASSIGN_TO_ADMIN_USER_ID to the backoffice user who should get the tickets. You find the number in the Id column under Admin > Backoffice Users.
  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​

  • Tickets per run: TOP_N in Settings (default 1).
  • Sensitivity: SCORE_THRESHOLD (default 30) and the three WEIGHTS.
  • The windows: RECENT_DAYS (30) and BASELINE_DAYS (60).
  • Repeat protection: COOLDOWN_DAYS (30).
  • Which orders count: ORDER_STATUSES (default NEW, CONFIRMED, VALIDATED and ARCHIVED, the same as the earlier version). Which statuses to include depends on how your team uses order statuses.
  • When it runs: the Schedule Mon+Thu 6am node.

Limits​

A run reads at most 200,000 orders. With more orders in 90 days the run stops with an error. Raise MAX_PAGES in Settings to allow more.

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.