Configuration Examples

Pre-built configurations for common business scenarios.

This page provides complete, copy-paste configuration examples for common business scenarios. Choose the example that best matches your store type and customize as needed.

B2C E-Commerce Store

Best for: Retail stores selling directly to consumers online.

Features:

  • All customer experience features enabled
  • Dynamic shipping estimates with zip code input
  • Local pickup options
  • Cross-sell recommendations
  • Enhanced variant selection
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Enable all consumer features
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Dynamic shipping for retail customers
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: true,  // If you have physical stores
      useStaticZipCode: false  // Let customers enter their zip
    },
  };
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

B2B Wholesale Store

Best for: Wholesale distributors, manufacturers selling to businesses.

Features:

  • Customer-specific pricing
  • Static zip code (warehouse location)
  • Cross-sell for upselling
  • Simplified shipping (no local pickup)
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // B2B customer pricing
    customerId: '{{ customer.id | json }}',

    // Enable B2B-friendly features
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Static zip for consistent wholesale shipping
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: false,  // Usually not needed for B2B
      useStaticZipCode: "60601"  // Replace with your warehouse zip
    },
  };
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Hybrid B2B/B2C Store

Best for: Stores serving both retail customers and wholesale accounts.

Features:

  • Detects customer type automatically
  • Shows B2B pricing when logged in
  • Dynamic shipping for retail, static for wholesale
  • All features enabled
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Customer ID for B2B pricing (empty for retail)
    customerId: '{{ customer.id | json }}',

    // Enable all features
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Conditional shipping based on customer type
    shippingEstimates: {
      enableDeliveryEtas: true,
      // Show pickup for retail, hide for wholesale
      enableLocalPickupEtas: {% if customer.tags contains 'wholesale' %}false{% else %}true{% endif %},
      // Static zip for wholesale, dynamic for retail
      useStaticZipCode: {% if customer.tags contains 'wholesale' %}"60601"{% else %}false{% endif %}
    },
  };
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Enterprise with PunchOut

Best for: Large organizations with SAP Ariba, Coupa, or other procurement systems.

Features:

  • PunchOut integration (automatic)
  • Enterprise pricing
  • Vendor inventory integration
  • Streamlined B2B experience
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Customer ID (will be set by PunchOut if not logged in)
    customerId: '{{ customer.id | json }}',

    // Enable enterprise features
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Corporate shipping address
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: false,
      useStaticZipCode: "10001"  // Corporate office zip
    },
  };

  // Note: PunchOut fromIdentity is automatically detected
  // No additional configuration needed for PunchOut
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Minimal Setup (Shipping Only)

Best for: Stores that only want shipping estimates and availability.

Features:

  • Shipping estimates only
  • No cross-sell or variant selector
  • Fastest performance
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Disable optional features
    enableCrossSell: false,
    enableImprovedVariantSelection: false,

    // Only shipping estimates
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: true,
      useStaticZipCode: false
    },
  };
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Dropshipping Store

Best for: Stores that dropship from distributors without holding inventory.

Features:

  • Multi-source inventory (Ingram Micro, TD SYNNEX)
  • Cross-sell for higher margins
  • Dynamic shipping
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Enable features for dropship
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Show shipping from distributor locations
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: false,  // No physical stores
      useStaticZipCode: false  // Dynamic based on vendor
    },
  };

  // Note: Multi-source inventory is configured in Weevio Cloud
  // Vendor API credentials must be set up in backend
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Regional/Multi-Location Store

Best for: Businesses with multiple physical locations serving different regions.

Features:

  • Shows local pickup at nearby stores
  • Regional inventory display
  • Location-specific shipping
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Enable location-based features
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    // Show local pickup prominently
    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: true,  // Show all store locations
      useStaticZipCode: false  // Let customers enter zip for nearest store
    },
  };

  // Configure store locations in Shopify Settings > Locations
  // Widget automatically shows nearest locations based on customer zip
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Testing/Development Configuration

Best for: Testing widget features in development environment.

Features:

  • All features enabled
  • Debug mode on
  • Test fromIdentity values
<script>
  window.weevioWidgetConfig = {
    // Required configuration
    shopifyDomain: '{{ shop.permanent_domain }}',
    teamID: 'your_team_id',
    baseURL: 'https://cloud.weevio.co',
    productId: '{{ product.id | json }}',
    variantId: '{{ product.selected_or_first_available_variant.id | json }}',
    productType: '{{ product.type | json }}',
    widgetType: 'product-page',

    // Enable everything for testing
    customerId: '{{ customer.id | json }}',
    enableCrossSell: true,
    enableImprovedVariantSelection: true,
    storefrontAccessToken: 'your_storefront_token_here',

    shippingEstimates: {
      enableDeliveryEtas: true,
      enableLocalPickupEtas: true,
      useStaticZipCode: false
    },

    // Enable debug logging
    debug: true
  };

  // Test fromIdentity in console:
  // sessionStorage.setItem('weevio_fromIdentity', 'SAP_Ariba_Buyer:TEST');
</script>

<div id="Weevio-eCommerce-Widget-Root"></div>
<script defer src="https://api.weevio.com/ecommerce-widget/index.js"></script>

Customization Tips

Replace Placeholders

In all examples above, replace:

  • your_team_id - Your actual Team ID from Weevio Cloud
  • your_storefront_token_here - Your Shopify Storefront API access token
  • "60601" or similar zip codes - Your actual warehouse/office zip code

Test Before Going Live

  1. Copy configuration to your theme
  2. Preview on a test product
  3. Test all features enabled
  4. Check browser console for errors
  5. Test on mobile device

Combine Examples

Mix features from different examples:

// Take B2B base config
// + Add multi-location from Regional example
// + Add debug from Testing example

Need More Help?

Need Help?

For assistance, please send a message to our Support page.