Skip to main content

Using Map Rules to control line items for Shopify orders syncing to QuickBooks Online

Create custom rules that tell MyWorks which QuickBooks item to use for Shopify line items, discount codes, and other line-level content — based on what they contain.

Updated today

What are Map Rules?

Map Rules give you a flexible, rule-based way to control which QuickBooks Online item, class, or location is used in a line item when MyWorks syncs a Shopify order to QuickBooks. Instead of needing to map every individual Shopify product/class or rely on SKU matches, you can create rules like:

  • "Any Shopify line item whose name contains 'Candle' should use the QuickBooks item Candles"

  • "Any Shopify discount code containing 'BOGO' should use the QuickBooks item Buy One Get One Discount"

  • "Any Shopify line item whose name contains 'Event' should use the QuickBooks class "Event Sales"

This is especially helpful if:

  • You have a large Shopify catalog that doesn't need to be recreated item-by-item in QuickBooks

  • You use multiple Shopify discount codes and want each one (or groups of them) to post to different QuickBooks items

  • You have custom line items or fee lines in Shopify orders that don't exist in your Shopify product catalog

  • You have multiple classes in QuickBooks that need to be used in different conditions for products, discounts, or shipping


Availability

Map Rules are available on Grow plans and above for Shopify Sync for QuickBooks Online.


How Map Rules fit with your existing mappings

Map Rules don't replace your existing product, variation, or collection mappings — they sit alongside them. When MyWorks syncs a Shopify order line item to QuickBooks, we check mappings in this order, and the first match wins:

  1. Product / Variation mapping (Map > Products or Variations)

  2. Collection mapping (Map > Collections)

  3. SKU-based matching (if enabled in Settings > Order)

  4. Map Rules

  5. Default for Unmatched Products (MyWorks Sync > Settings > Default)

This means any Shopify product or variation you've mapped directly will always take priority over a rule. Rules kick in for line items that aren't individually mapped, giving you a cleaner catch-all than the default product setting.


Creating a Map Rule

Visit the Rules tab at MyWorks Sync > Map > Rules in your Shopify admin.

To add a new rule:

  1. Click Add Rule

  2. Choose the Shopify Order Line — what MyWorks should check against when looking at each Shopify line item:

    • Line Item Name — the product/line item name on the Shopify order

    • Discount/Coupon — applies to Shopify discount code lines on the order

    • Shipping — applies to shipping lines on the Shopify order

  3. Enter the Contains value — the text MyWorks should look for. Matching is case-insensitive, so "Candle", "candle", and "CANDLE" all match the same way.

  4. Select the QuickBooks Item, Class, and/or Location you'd like MyWorks to use when this rule matches. Each is optional, leave empty if no value is desired.

  5. Click Save

Your new rule will appear in the rules list, and will start taking effect on the next order MyWorks syncs.


Rule priority and order

If a Shopify line item could match more than one rule, MyWorks uses the first matching rule in your rules list — top to bottom.

You can drag rules in the list to reorder them. Put more specific rules above more general ones — for example, if you have a rule for "Holiday Candle" and a broader rule for "Candle", put "Holiday Candle" above "Candle" so it matches first for holiday-specific orders.

You can also toggle any rule on or off using the Enabled toggle, without deleting it.


Example: Routing discount codes to different QuickBooks items

Let's say you run two types of promotions in Shopify, and you want each to show as its own line item in QuickBooks so your team can report on them separately.

Shopify Discount Code contains

→ QuickBooks Item

BOGO

Buy One Get One Discount

WELCOME

Welcome Discount

SUMMER

Seasonal Promo Discount

You'd create three rules, each using the Discount Code match field with the contains value BOGO, WELCOME, and SUMMER, pointing to the relevant QuickBooks item.

Any Shopify order that uses a discount code like BOGO25 or WELCOME10 will sync the discount line to the matching QuickBooks item. Discount codes that don't match any rule will continue to sync using your existing discount settings.


Example: Grouping many Shopify products under one QuickBooks item

If you sell hundreds of candle variants in Shopify but only track a single "Candles" revenue line in QuickBooks, you can create a rule like:

  • Match Field: Line Item Name

  • Contains Value: Candle

  • QuickBooks Item: Candles

Any Shopify line item with "Candle" in the name — that isn't otherwise mapped — will sync to the Candles item in QuickBooks. This lets you keep a lean QuickBooks catalog while still syncing every Shopify order.


Things to know

  • Matching is "contains," not "exact." A rule set to contain "Candle" will also match "Candle Holder" or "Scented Candle." Order your rules from most specific to most general if you need precise control.

  • Rules are case-insensitive. You don't need to worry about capitalization.

  • If the QuickBooks item no longer exists, MyWorks will fall back to the item you've set under Settings > Default for unmatched products.

  • Rules only affect new orders and re-pushed orders. Existing orders in QuickBooks won't change retroactively. To apply a new rule to a previously synced order, re-push it from MyWorks Sync > Push > Orders.

Did this answer your question?