Metafields & data storage reference
DollarBack stores its operational data directly on Shopify resources as metafields. This page lists every namespace and key the app writes to customers and orders, so you can consume them from Shopify Flow, integrations, exports, or your own code.
Customer metafields
dollar-cashback.balance-adjustments
json
Store credit the customer owes you, per originating order (see below). Powers the "Store credit owed" admin block and is drawn down from future cashback.
dollar-cashback.customer-data
json
Internal per-customer program state, such as birthday reward scheduling.
dollar-cashback.birthday
date
The birthday collected by the birthday program, as YYYY-MM-DD.
dollar-cashback.earned-coupons
json
Append-only list of reward codes issued to this customer.
db-referral.code
string
The customer's referral code; how a redeemed code is mapped back to its referrer. See Referral codes & bulk sync.
db-referral.referral-count
json (a number)
How many referral rewards this customer has earned as a referrer. It goes up by one each time a referral reward is credited to them, and loyalty tiers read it for their referrals requirement.
dollarback-tiers.tier-state
json
The customer's effective and earned loyalty tier, keyed by tier id. Read by the storefront widgets. See Sync tiers to customers.
dollarback_tiers.customer_tier
string
The customer's current tier name as plain text, so customer segments and Flow can filter on it. See See tier customers as a Shopify segment.

Shape of balance-adjustments
The value is an array with one entry per debt, each carrying its own audit trail:
The engine only cares about the per-currency sum of remainingAmount: that total is deducted from the customer's next cashback before it is credited. Manual changes made in the admin block are appended as admin_override transactions; debts created from the customer page (rather than a clawback) use orderId: 0.
Order metafields
DollarBack writes to every order it processes; an order with none of these metafields simply had no DollarBack activity. These fields feed the "DollarBack summary" admin block on the order page.
Namespace dollar-cashback
cashback-details
The full calculation detail for the order, including pending credits with their status and the applied tier multiplier.
store-credit-given
Display amount of cashback issued for the order.
store-credit-used
Store credit the customer spent paying for the order.
no-credit-reason
Why the order earned nothing, when it didn't.
discount-code-rewards
Earn-side reward codes issued from this order, each with its status (e.g. revoked).
order-edit-history
One entry per cashback recalculation after an order edit.

Namespace dollar-referral
referral-details
The referrer this order was attributed to (name, email) and the commission paid (cashbackGiven, currency).
referral-edit-history
One entry per referral-reward recalculation after an order edit.
Using the data
Shopify Flow: metafields make good conditions; the tag-by-tier example in Sync tiers to customers reads
dollarback_tiers.customer_tier, and Flow triggers/actions for credit itself are covered in Shopify Flow triggers & actions.Storefront: don't read metafields from Liquid for balances; use the Storefront window API, which returns live values.
Backend: for reads and writes with guarantees, use the Merchant API instead of mutating metafields.
Related articles
Last updated