For the complete documentation index, see llms.txt. This page is also available as Markdown.

Move a customer's balance to their company location

Plan: the bulk import route needs a plan with bulk import and B2B store credit; check your plan's feature list. The Shopify Flow route uses only Shopify's own Flow app.

When you're done, a customer who registers as a business (becomes a contact on a company location) will be able to spend the cashback they earned as an individual, because the balance now sits on their company location.

Why the balance needs to move

Once a customer is a contact on a company location, their checkout becomes a B2B checkout. At a B2B checkout, Shopify only offers store credit held on the company location, not on the buyer's personal account (see Shopify's considerations for B2B store credit). The personal balance isn't lost, it just can't be spent until it's on the location.

There are two ways to move it:

Route
Best for
Effort

Every new registration, automatically

One-time setup

Customers who registered before you set up the workflow, or fixing a single case

A minute per customer

Prerequisites

  • Shopify B2B set up, with companies and company locations.

  • Give store credit to B2B buyers on company locations turned on in DollarBack admin → Settings → Advanced, so future B2B orders earn on the location. See B2B store credit.

  • For the Flow route: the Shopify Flow app installed on your store.

The expanded Advanced card in Settings with the order edit tracking and B2B store credit checkboxes and the Exclude customers by tag field.
Give store credit to B2B buyers on company locations is in the Advanced section of Settings.

Automate it with Shopify Flow

The workflow has one trigger, one condition and two actions:

1. Create the workflow and pick the trigger

  1. In Shopify admin, open Apps → Flow and click Create workflow.

  2. Click Select a trigger and choose Company contact assigned permission. It runs whenever a customer is given access to a company location, including when a registration form creates the company.

2. Add a condition

  1. Click + → Condition.

  2. Choose Company contact → Customer → Store credit accounts, set it to At least one of, then Balance → Amount is greater than 0.

The condition also keeps the workflow from doing anything when the same customer is added to a second location later, because their personal balance is already zero.

3. Credit the company location

  1. On the Then branch, add the action Send Admin API request.

  2. Set Mutation to storeCreditAccountCredit.

  3. Paste this into Mutation inputs. Change EUR to your store credit currency.

4. Debit the customer's personal balance

  1. Below the first action, add a second Send Admin API request.

  2. Set Mutation to storeCreditAccountDebit.

  3. Paste this into Mutation inputs, using the same currency as step 3.

Keep the credit action first and the debit action second, so the customer never ends up with less than they had.

5. Turn it on

Name the workflow (for example Move cashback to company location) and click Turn on workflow.

Good to know

  • Currency: the workflow moves one currency. If you issue store credit in several currencies, make one copy of the workflow per currency.

  • Several locations: the balance goes to the first location the customer is assigned to. For a new registration, that's the location the form creates.

  • Expiry: the moved balance has no expiry date. To set one, add "expiresAt": "2027-06-30T00:00:00Z" inside creditInput.

  • Where it shows up: the move happens directly in Shopify, so both transactions appear on the customer and the company location in Shopify admin. It doesn't appear in DollarBack's Activity log.

  • Credit still on hold from a personal order lands on the personal account when it releases, after the workflow has run. Move it by hand with the steps below.

Move a balance by hand

Use two one-row bulk imports: first credit the location, then debit the customer. Both appear in DollarBack's Activity log.

1. Find the balance and the location ID

  1. In Shopify admin, open the customer and note their store credit balance and currency.

  2. Open Customers → Companies, then the company, then the location. The location ID is the number at the end of the page address: .../companies/.../locations/1234567890.

2. Credit the company location

Create a CSV with one row:

  1. Open DollarBack admin → Home and, in the Quick links card, click Open next to Bulk import.

  2. Set Action Type to Credit and turn on B2B Mode.

  3. Leave Notify Customers off.

  4. In Reason, enter something like Moved personal balance to company location.

  5. Upload the file and click Import CSV.

The Upload CSV File card with Action Type, Credit expires, the Notify Customers, Send to Integrations and B2B Mode switches, and the Reason field.
For a balance move, run two one-row imports: a Credit with B2B Mode on, then a Debit with B2B Mode off.

ExpiryDays is optional: 0 means no expiry.

3. Debit the customer

Create a second CSV for the same customer and amount, without the location column:

  1. Open DollarBack admin → Home and, in the Quick links card, click Open next to Bulk import.

  2. Set Action Type to Debit and make sure B2B Mode is off.

  3. Leave Notify Customers off.

  4. Upload the file and click Import CSV.

To move several customers at once, put one row per customer in each file. Duplicate rows are not removed.

Verify it works

  • The company location in Shopify admin shows the moved balance.

  • The customer's personal store credit is zero.

  • A B2B checkout as that customer offers store credit as a payment method.

Common issues

  • The Flow run failed: open the run in Flow's run history to see which action failed. If the credit action failed, nothing was taken from the customer; move the balance by hand.

  • Bulk import rows failed with a location error: the CompanyLocationId was in the gid:// form, or belongs to another company. See My bulk import failed.

  • Store credit isn't offered at checkout: confirm the buyer is checking out on the location that holds the balance. See Store credit isn't available at checkout.

  • Every buyer at the company can spend the balance: that's expected. Location credit belongs to the business, not to one buyer.

Last updated