Documentation

Build your first rule.

Rulic rules are WHEN / THEN statements evaluated against live checkout data — no Rust, no redeploys. This page covers the basics; the in-app simulator on the homepage lets you try it live.

Introduction

Rulic compiles configuration into native Shopify Functions — payment customization, delivery customization, and cart/checkout validation — so agencies stop hand-writing Rust for every client.

A rule has three parts: a condition (WHEN), an optional chain of additional conditions (AND / OR), and one or more actions (THEN).

Quick start

Here's a complete rule that hides Cash on Delivery outside a set of supported markets:

payment-rules / cod-regions.rule
WHEN shipping.country not in ["AE", "SA", "MA"] THEN hide payment("Cash on Delivery")

Paste it into the builder, adjust the country list, and simulate before deploying — nothing touches production until you're ready.

Conditions

Conditions read from live checkout data: customer, cart, and shipping context, plus any metafields you expose.

  • customer.company, customer.tag — company accounts and tags
  • cart.total, cart.weight, line.quantity — cart-level data
  • shipping.country, market — geography
  • product.tag, product.collection — catalog data

Combine conditions with AND / OR, and nest them for more complex logic.

Actions

  • show / hide — payment or shipping methods
  • rename — relabel a method for a specific segment
  • block — stop checkout with a custom message
  • set — attach metadata such as priority

Templates

Common patterns — wholesale terms, MOQ, freight, COD control, VIP handling — ship as ready-made templates. Browse the full library in the Solutions section and adjust values instead of writing rules from scratch.

Simulating rules

Every rule set can be run against any checkout context — customer type, country, cart total — with a full execution trace showing which rules matched and why. Try it live in the homepage simulator.

Import / export

Configurations export as portable JSON. Keep them in version control, clone them to development stores, or import them straight into the next client's store.