Use cases

Make Shopify workflows merchant-configurable without exposing the code

A good workflow separates merchant-facing settings from technical logic. JsWorkflows can expose safe configuration fields while keeping code maintainable.

merchant configurable workflowsShopify workflow settingsworkflow configurationJavaScript automation5 min read

Custom workflow code is powerful, but merchants should not need to edit code every time they want to change a threshold, tag, email address, CSV URL, or sales channel.

The best workflow design separates business settings from technical logic.

The pain point

Many automations start with hardcoded values:

  • A tag name.
  • A minimum order value.
  • A Slack channel.
  • A notification email.
  • A CSV URL.
  • A location ID.
  • A product type filter.

Hardcoding is fast for a developer, but it creates friction later. The merchant has to open code for a simple business change, or ask the developer to make every small adjustment.

What should be configurable

Merchant-facing settings are values the store team understands.

Good setup fields include:

  • Tags to add or remove.
  • Email recipients.
  • CSV URLs.
  • Minimum order value.
  • Product types, vendors, or customer segments.
  • Shopify resource IDs selected during setup.
  • Dry-run or active mode.

These are business choices.

What should stay in code

Technical settings should usually stay in code.

  • Page size.
  • Retry count.
  • Batch size.
  • Continuation delay.
  • GraphQL query structure.
  • Throttle handling.
  • Low-level error parsing.

These values affect workflow mechanics. Exposing too many of them makes the setup page harder to understand and easier to misuse.

How JsWorkflows helps

JsWorkflows supports configuration fields that can appear in the workflow setup UI. The workflow code can import those values from config.js, while technical constants remain in code.

That gives both sides what they need:

  • Merchants can safely change business settings.
  • Developers keep control of the implementation.
  • The workflow remains readable.
  • The setup page becomes part of the workflow documentation.

Why this matters for adoption

Many merchants are willing to use custom automation, but not if every change requires editing JavaScript.

Merchant-configurable workflows make custom logic feel closer to a productized workflow. The merchant can install or request a workflow, configure the important values, test it, and turn it on.

That is especially important for templates and AI-generated workflows. The code can be advanced, but the setup should still feel approachable.

Example

For a workflow that sends a daily summary of high-value orders, the setup UI might expose:

  • Minimum order value.
  • Recipient email.
  • Included financial statuses.

The code should keep:

  • Shopify query pagination.
  • Retry behavior.
  • Email formatting helpers.
  • Logging and error handling.

This keeps the workflow useful for non-developers without weakening the implementation.

A practical rule

If the merchant would naturally ask, "Can I change this later?", it probably belongs in setup.

If the value controls reliability, batching, retry behavior, or API details, it should probably stay in code.