Installments Block Function
Disables Shop Pay Installments at checkout if the customer carries a B2B tag or if the cart total exceeds $5,000.
Disable Shop Pay Installments for two customer segments: those tagged as B2B and those placing orders over $5,000. Show a disclosure message at checkout explaining why the option is unavailable. Automatically tag wholesale customers when they sign up through the B2B portal. Track B2B customer activity and high-value orders to verify the rules are working correctly.
Disables Shop Pay Installments at checkout if the customer carries a B2B tag or if the cart total exceeds $5,000.
Displays a notice at checkout when Shop Pay Installments is disabled, clarifying to B2B or high-value buyers why the option is unavailable.
{% if customer and customer.tags contains 'b2b' %}
<div style="padding: 12px; margin: 12px 0; border-left: 3px solid #999; background: #f9f9f9; font-size: 13px; color: #666;">
<strong>B2B Account:</strong> Installment payment options are not available for wholesale orders.
</div>
{% elsif cart.total_price > 500000 %}
<div style="padding: 12px; margin: 12px 0; border-left: 3px solid #999; background: #f9f9f9; font-size: 13px; color: #666;">
<strong>Large Order:</strong> Installment payment options are not available for orders over $5,000.
</div>
{% endif %}
Automatically tags new wholesale customers with 'b2b' when they sign up through the B2B portal or when manually marked by staff.
Trigger: Customer created OR Customer updated (via B2B portal signup)
Condition: customer.note contains "wholesale" OR customer has metafield company_id (indicates B2B)
Action 1: Add tag "b2b" to customer
Action 2: Send confirmation email to merchant (optional: notify fulfillment that this is a wholesale order)
A reference query listing all B2B-tagged customers and their recent order history, used to audit rule effectiveness and catch edge cases.
# Admin GraphQL — fetch B2B customers and their order history
query B2BCustomerReport {
customers(first: 50, query: "tag:b2b") {
edges {
node {
id
firstName
lastName
email
tags
orders(first: 3, sortKey: CREATED_AT, reverse: true) {
edges {
node {
id
name
totalPriceSet {
shopMoney {
amount
}
}
createdAt
}
}
}
}
}
}
}
Sketch your build in 30 seconds — voice, type, or attach a screenshot.
Sketch the build →