Demo This site is for demonstration only. No purchases are available here. All transactions happen inside the Shopify admin via Shopify Billing.
Home â€ē Documentation

Documentation

Everything you need to install, configure, and master ZS B2B Gateway. Browse by topic on the left or search across all docs.

Introduction

ZS B2B Gateway turns your Shopify store into a complete wholesale operation. This guide walks through every feature with step-by-step instructions, examples, and best practices.

What is ZS B2B Gateway?

ZS B2B Gateway is a Shopify app that helps you accept, process, and manage wholesale customer applications. It works on every Shopify plan and adapts its workflow based on whether your store is on Shopify Plus or a standard plan.

The app covers the full wholesale lifecycle:

  • Acquire — Customizable application forms embedded on your storefront
  • Process — Admin inbox with filtering, tags, and bulk actions
  • Approve — One-click approval creates Shopify customers or B2B companies
  • Tag & segment — Auto-tag based on form data, sync to Shopify segments
  • Price — Tag-based discount rules that sync to Shopify Discounts
  • Control visibility — Hide prices from non-wholesale visitors
💡 Quick tip

If you prefer learning by watching, our video tutorials cover every feature in under 5 minutes each.

Installation

Installing ZS B2B Gateway takes under one minute. You'll need an active Shopify store on any plan.

Step 1 — Add the app

  1. Visit the Shopify App Store and search for ZS B2B Gateway
  2. Click Add app
  3. You'll be redirected to your Shopify admin to authorize the install

Step 2 — Approve permissions

The app will request a set of OAuth scopes. Review them and click Install app. See the permissions section below for a detailed breakdown of why each scope is needed.

Step 3 — Land on the dashboard

After install, you'll land on the Dashboard with a setup checklist. Follow the steps to publish your first form and start accepting applications.

â„šī¸ Note

If you're on Shopify Plus, the app will also request protected customer data access. This is required to create B2B Companies and assign catalogs. Approval typically takes seconds on a dev store and 1–3 days on a production store via Shopify's review.

Permissions & scopes

ZS B2B Gateway requests the minimum scopes needed for each feature. Here's why each one is required:

Scope Why we need it
read_customers / write_customers Create customer records on approval, apply tags, and sync wholesale status
read_companies / write_companies Plus stores only — create B2B Companies and assign approved customers
read_discounts / write_price_rules / write_discounts Auto-create and sync tag-based discount rules to Shopify Discounts
read_publications / write_publications Read sales channels for non-Plus stores; assign wholesale customers to private channels
read_metaobjects / write_metaobjects Store visibility rule metadata accessible to the theme app block
read_products / write_products Scope discount and visibility rules to specific products or collections
âš ī¸ Important

Protected customer data access is required for processing applications. The app requests this during install. Without it, customer creation on approval will fail. Learn about protected data.

Your first form

The fastest way to start accepting wholesale applications:

  1. Open Form Builder from the left navigation
  2. Review the four default fields: First Name, Last Name, Email, Company Name
  3. Add any custom fields you need (Business Type, Tax ID, Volume estimate)
  4. Switch to the Branding tab and set your primary color and button text
  5. Switch to the Display tab to choose between Popup, Embedded, or Both
  6. Click Save draft to save without publishing, or Publish form to make it live on your storefront

Once published, a floating "Apply for Wholesale" button appears on every page of your storefront. Customers click it to open the form modal.

Plus vs Standard behavior

The app automatically detects your store's plan and adjusts the approval workflow accordingly.

Shopify Plus stores

On approval, the app:

  • Creates a B2B Company via the companyCreate mutation
  • Creates a company contact and associates them with the company
  • Assigns the company to your default catalog (configurable per approval)
  • Applies all tags to the customer record
  • Sends the approval email with a B2B login link

Standard plans (Basic, Shopify, Advanced)

On approval, the app:

  • Creates a Customer via the customerCreate mutation
  • Applies the wholesale and b2b-approved tags (plus any custom tags)
  • Optionally associates with a private sales channel if configured
  • Sends the approval email with the activation link
💡 Same outcome, different mechanism

Both flows give your wholesale customers the same experience — special pricing, gated access, and a smooth checkout. The technical implementation differs because Shopify Plus has native B2B primitives while standard plans rely on tag-based discount rules.

Form Builder — Field types

The form builder supports 10 field types. Drag any field from the field list to add it. Click a field to edit its label, name, placeholder, validation, and required state.

Type Use for
Short textSingle-line text input (names, IDs, short answers)
Long textMulti-line textarea (descriptions, business details)
EmailEmail field with built-in format validation
PhonePhone number with international format support
NumberNumeric input with optional min/max constraints
DropdownSingle-select with custom options
Radio buttonsVisible single-select with custom options
CheckboxYes/no toggle or agreement checkbox
Date pickerNative date input
File uploadSingle or multiple file uploads (PDF, image, doc) up to 25 MB on Pro plan

Four core fields (First Name, Last Name, Email, Company Name) are locked and always required — they're needed for the approval workflow.

Display modes

Choose how the form appears on your storefront. Switch in Form Builder → Display.

  • Popup — A floating "Apply for Wholesale" button on every page. Clicking it opens the form in a modal.
  • Embedded — The form is inserted directly on a page where you place it. Use the theme app block to position it.
  • Both — Both popup button and embedded support are available. Choose per-page in the theme editor.

Popup is the default and works on every theme without configuration. Embedded requires adding the theme app block on the page where you want the form.

Form branding

Match the form to your brand:

  • Primary color — Used for button, accents, and form title. Use the color picker or paste a hex value.
  • Button text — Customize the floating button label (default: "Apply for Wholesale")
  • Form title & subtitle — Shown at the top of the form
  • Success message — Shown after a customer submits an application
  • Button animation — Optional pulse, bounce, shake, or glow effect on the floating button

Field validation

Each field supports several validation options depending on its type:

  • Required — Customer must fill the field to submit
  • Min/max length — For text and textarea fields
  • Min/max value — For number fields
  • File size limit — Per-field for file upload fields (2 MB, 5 MB, 10 MB, 25 MB)
  • Allowed file types — PDF, Images, Documents, Spreadsheets

Validation runs both client-side (instant feedback) and server-side (security). Validation errors appear inline beneath each field.

Application lifecycle

An application moves through these states:

  1. PENDING — Just submitted, awaiting review
  2. APPROVED — Reviewed and accepted, customer record created in Shopify
  3. REJECTED — Reviewed and declined, customer received rejection email
  4. APPROVAL_PARTIAL — Approval started but one or more downstream actions failed (e.g., Shopify customer created but discount sync failed). Use "Retry approval" to re-run failed steps.
â„šī¸ Partial approvals

The approval flow runs multiple steps in sequence: create customer → apply tags → assign catalog → send email. If any non-critical step fails, the application enters APPROVAL_PARTIAL state with a detailed error log. You can retry the failed steps individually.

Approving applications

From the application detail page:

  1. Review the applicant's form data, uploaded files, and applied tags
  2. Click Approve in the top right
  3. For Plus stores: select a catalog to assign the customer to
  4. Confirm the approval

Approval triggers the following sequence (most steps run in the background):

  • Create/update customer in Shopify
  • Apply all configured tags
  • Assign to catalog (Plus) or sales channel (Standard)
  • Run any matching auto-tagging rules
  • Sync customer segments (if rules with sync enabled match)
  • Send approval email with login link
  • Update application status to APPROVED

Bulk operations

To approve multiple applications at once:

  1. Filter the Applications list to show what you want to process
  2. Select applications using the checkboxes on each row
  3. Click Bulk approve in the action bar
  4. Confirm in the modal

Bulk approvals are queued and processed in the background. You'll see a progress notification as they complete. If any fail, they enter APPROVAL_PARTIAL state for individual review.

Bulk export is also available — select applications and click Export to CSV to download a spreadsheet of the selected records.

Tags & internal notes

Every application has two types of metadata:

  • Tags — Sync to the Shopify customer record on approval. Used for discount rules, segments, and visibility rules. Editable from the application detail page.
  • Internal notes — Free-text notes visible only to your team. Never shared with the customer. Use them to track communication history or approval reasoning.

Auto-tagging rules

Create if-then rules that automatically apply tags based on form data:

  1. Open Auto-tagging from the left navigation
  2. Click Create rule
  3. Set a name and priority (higher priority runs first)
  4. Add conditions: choose a field, an operator, and a value
  5. If you have multiple conditions, choose AND or OR logic
  6. Add the tags to apply when conditions match
  7. Optionally enable Sync to Shopify segment
  8. Save

Rules evaluate instantly on form submission. Tags carry over to the Shopify customer record on approval.

Supported operators

  • equals / does not equal
  • contains / does not contain
  • is empty / is not empty
  • greater than / less than (number fields only)

Customer segments

When you enable Sync to Shopify segment on any tagging rule, the app:

  1. Creates a matching customer segment in your Shopify admin
  2. Builds a query like customer_tags CONTAINS 'wholesale' based on the tags
  3. Keeps the segment in sync as customers get tagged or untagged
  4. Logs every sync attempt with status and error details

Use these segments for marketing campaigns, discount targeting, or analytics in Shopify.

â„šī¸ Limitation

Shopify's customer segment API doesn't support all the same logic as the app's tagging rules. If your rule uses complex conditions, the segment will be approximated using the resulting tags rather than the original form-data conditions.

Pricing rules

Tag-based discount rules sync automatically to Shopify Discounts. Customers with matching tags see the discount applied at checkout.

Discount types

  • Percentage off — e.g., 25% off all products
  • Fixed amount off — e.g., $10 off per order
  • Fixed price — Set products to a specific price (less commonly used)

Scope

  • All products
  • Specific collections — Add collection IDs from your Shopify admin URL
  • Specific products — Add product IDs from your Shopify admin URL

Tag matching

Customer must have any or all of the listed tags. Use ANY for OR logic, ALL for AND.

Minimum requirements

  • Minimum order amount — Discount only applies if order subtotal exceeds this value
  • Minimum quantity — Discount only applies if cart has at least this many items

Priority

When multiple rules match the same customer and products, higher priority rules apply first. Shopify's discount engine evaluates them in order.

Price visibility

Control who sees your prices on the storefront using four modes:

ModeBehavior
Hide pricePrice element is removed silently
Login requiredShows "Log in to see price" link in place of the price
Wholesale onlyShows your custom message for non-wholesale visitors
Hide product entirelyRemoves the entire product card from collection pages and product pages

Setup

  1. Open your theme editor (Online Store → Themes → Customize)
  2. Navigate to any product page
  3. Click Add block in the product info section
  4. Select Price Visibility under app blocks
  5. Save the theme
  6. Return to the app and create visibility rules
âš ī¸ Required step

Visibility rules won't take effect until the theme app block is installed on your product pages. Without it, prices remain visible to all visitors.

Bypass tags

Use bypass tags to let specific customers always see prices. For example, set wholesale as a bypass tag on a Login-required rule, and approved wholesale customers will see prices while everyone else sees the login prompt.

Email templates

Customize all four transactional emails in Settings → Email templates:

  • Application received — Sent to the customer after they submit
  • Approval — Sent on approval with login/activation link
  • Rejection — Sent on rejection, optionally with your reason
  • Admin notification — Sent to your team on every new application

Template variables

Use these tokens in subject lines and email bodies — they're replaced with real values at send time:

  • {{firstName}} — Applicant's first name
  • {{lastName}} — Applicant's last name
  • {{companyName}} — Company name
  • {{email}} — Applicant's email
  • {{shopName}} — Your store name
  • {{loginUrl}} — Login link (approval emails only)
  • {{rejectionReason}} — Your rejection reason (rejection emails only)

Default catalog

On Shopify Plus, approved customers are assigned to a catalog. Set your default in Settings → Default catalog. You can override this per-application when approving.

On standard plans, this setting maps to a sales channel — useful for stores running private wholesale sales channels alongside their public storefront.

Sender identity

Configure how emails appear in customers' inboxes:

  • From name — The name shown in the inbox (e.g., "Acme Wholesale Team")
  • From email — The sender email address (requires Resend domain verification — see below)
  • Reply-to email — Where customer replies go (optional)

Sending from your own domain

To send emails from your own domain (e.g., wholesale@yourstore.com):

  1. Add your domain in our Resend account (we'll guide you)
  2. Add DNS records to your domain provider (SPF, DKIM, DMARC)
  3. Wait for verification (usually under 1 hour)
  4. Set the From email in Settings → Email templates → Sender settings

Without custom domain setup, emails are sent from wholesale@send.zilancer.com with your store name as the From name.

Webhooks

The app subscribes to several Shopify webhooks to keep data in sync:

TopicPurpose
app/uninstalledTrigger data deletion within 48 hours
customers/data_requestGDPR — respond to customer data access requests
customers/redactGDPR — delete customer data on request
shop/redactGDPR — delete all shop data 48 hours after uninstall
customers/updateSync customer tag changes back to the app
customers/deleteMark application as deleted-customer when source customer is removed

All webhooks are HMAC-verified before processing. Webhook failures are retried with exponential backoff up to 5 times.

Data model

The app stores the following primary entities:

// Simplified Prisma schema model Shop { id String shopDomain String formConfig FormConfig applications Application[] pricingRules PricingRule[] taggingRules TaggingRule[] visibilityRules VisibilityRule[] } model Application { id String email String companyName String formData Json status Status tags String[] files File[] createdAt DateTime } model PricingRule { id String customerTags String[] discountType DiscountType discountValue Float scope DiscountScope shopifyDiscountId String? syncStatus SyncStatus }

Full schema is available on request for security audits and compliance reviews.

Troubleshooting

Form doesn't appear on storefront

  • Verify the form is published (not just saved as draft)
  • Check the theme app embed is enabled (Online Store → Themes → Customize → App embeds)
  • Clear your browser cache and reload

Discount didn't sync to Shopify

  • Check the rule's sync status badge — if "Failed", click Sync now to retry
  • Verify the rule is enabled
  • If using collection or product scope, verify the IDs exist in your store

Customer not getting wholesale price at checkout

  • Confirm the customer has the matching tag on their Shopify customer record
  • Verify the discount is "Active" in Shopify Discounts
  • Check minimum order/quantity requirements aren't blocking it
  • Make sure the customer is logged in at checkout (discounts only apply to logged-in customers with matching tags)

Approval emails not arriving

  • Check the customer's spam folder
  • Verify the approval email is enabled in Settings → Email templates
  • If using a custom sender domain, confirm DNS records are still valid

Can't find a solution? Email contact@zilancer.com with your store URL and a description of the issue.

Uninstall & data deletion

When you uninstall ZS B2B Gateway:

  1. Shopify immediately revokes the app's access tokens
  2. Within 48 hours, we delete all your data from our systems
  3. Customer records, tags, and discounts already created in your Shopify store remain in your store — they belong to you

To request earlier or full data erasure at any time (including during installation), email contact@zilancer.com.

See our Privacy Policy for full details on data retention and your rights.

Ready to grow your wholesale business?

Join hundreds of Shopify merchants automating their B2B operations. Free plan available — no credit card required.