Tinx B2B Pricing Plugin

Using the Tinx B2B Pricing plugin for Tinx, you can extend the price configuration used in your data sync. It allows you to apply differences per customer, set up pricing based on specific customer price groups as well as customer discount groups. The plugin offers the following pricing adjustments:

  • Set a fixed price for an individual customer.
  • Set a fixed price for a specific customer group.
  • Set a fixed price for all customers.
  • Set a campaign price for a certain period.

Besides the fixed pricing adjustments, the plugin offers these discount options:

  • Set a fixed discount percentage (%) for an individual customer.
  • Set a fixed discount percentage (%) on specific item groups in combination with the customer discount group.
  • Set a fixed discount percentage (%) for all customers.
  • Set a campaign discount for a certain period.

WordPress

Install the Tinx B2B Pricing plugin. If you don't have access to our extension yet, please reach out to our support department: support@tinx-it.nl.

They can provide you with a zip file, which you can then upload as a plugin in WordPress.

Configuration

In the WordPress back-end you can find the Tinx B2B Pricing menu in the left menu bar. In the menu you will find the following elements:

  • Field Explanation
    Apply Price To

    Specifies the type of entity to which the price is assigned.

    Entity types: All Customers, Customer, Customer Price Group and Campaign.

    The entity types Customer, Customer Price Group and Campaign must be determined in the WordPress user (customer). We've added a section: Tinx B2B Customer Information (see screenshot).

    Price Reference

    Specifies the entity to which the prices are assigned.

    SKU

    Specifies the identifier of the product.

    Minimum Qty

    Specifies the minimum quantity of the product.

    Unit Price

    Specifies the unit price of the product.

    Start Date

    Specifies the date from which the price is valid.

    End Date

    Specifies the last date that the price is valid.

    Allow Discount

    Specifies if a sales discount will be calculated when the price is offered.

  • Field Explanation
    Apply Discount To

    Specifies the type of entity to which the discount is assigned.

    Entity types: All Customers, Customer, Customer Disc. Group and Campaign.

    The entity types Customer, Customer Disc. Group and Campaign must be determined in the WordPress user (customer). We've added a section: Tinx B2B Customer Information (see screenshot).

    Discount Reference

    Specifies the entity to which the discounts are assigned.

    Discount Type

    Specifies the type of the product.

    Product types: All Items, Item and Item Discount Group.

    The product type Item Discount Group must be determined in the item. We've added a field in the section General: Discount Group (see screenshot).

    Item Reference

    Specifies the product(s) to which the discounts are assigned.

    Minimum Qty

    Specifies the minimum quantity of the product.

    Discount (%)

    Specifies the discount percentage for the product.

    Start Date

    Specifies the date from which the price is valid.

    End Date

    Specifies the last date that the price is valid.

  • Field Explanation
    Enable Sales Prices/Discounts

    The pricing in the Sales Price and Sales Discounts table will overwrite the default pricing, if applicable.

    Show Original Price

    The front-end pricing will display the default pricing as the regular price and the Tinx B2B pricing as the special price.

    Show Bulk Discount Table On Product Detail Page

    Determine if you want to display a tiered pricing table on the product detailpage.

    There is also a shortcode available, allowing the table to be displayed anywhere on the product detail page, regardless of the above settings. The shortcode is as follows: [tinx_bulk_discount_table].

    On which hook should the bulk discount table be shown

    Specifies a hook where the tier price table should be displayed.

    Priority for the hook where the bulk discount table is shown

    Specifies the exact position relative to other actions on the selected hook.

    Apply Campaign Price to all Customers

    In Business Central, assigning all customers to a campaign is not a straightforward process. When this setting is activated, all campaigns apply to all customers.


Business Central

Business Central communicates with the B2B Pricing Plugin via the REST API. You have to create a WooCommerce REST key to facilitate this communication. To set this up, please read this article. Once you've installed the Tinx WooCommerce Connector in Business Central, you can activate our default messages in the Dashboard Job: WOO-OUT-B2B-PRICING.

We've created the following REST endpoints if you want to created your own messages:

    • POST /wp-json/wc/v3/tinx-sales-price
      PUT /wp-json/wc/v3/tinx-sales-price/7
      DELETE /wp-json/wc/v3/tinx-sales-price/7

      Request Body (POST/PUT):

      {
        "sku": "1896-S",
        "apply_price_to": "Customer Price Group",
        "price_reference": "RETAIL",
        "min_qty": "2.00",
        "unit_price": "300.00",
        "start_date": "2021-12-13",
        "end_date": "2026-05-14",
        "allow_discount": "1"
      }      
    • POST {"success":true,"data":7}
      DELETE {"success":true,"data":1}

    • POST /wp-json/wc/v3/tinx-sales-discount
      PUT /wp-json/wc/v3/tinx-sales-discount/15
      DELETE /wp-json/wc/v3/tinx-sales-discount/15

      Request Body (POST/PUT):

      {
        "sku": "1896-S",
        "apply_discount_to": "Customer Disc. Group",
        "discount_reference": "DET.HANDEL",
        "discount_item_type": "Item",
        "discount_item_reference": "1896-S",
        "discount_pct": "13.00",
        "min_qty": "1.00",
        "start_date": "2023-12-13",
        "end_date": "2025-12-14"
      }       
    • POST {"success":true,"data":15}
      DELETE {"success":true,"data":1}

We've modified the following default WooCommerce REST endpoints:

  • POST /wp-json/wc/v3/customers
    PUT /wp-json/wc/v3/customers/25

    Request Body (POST/PUT):

        
    ...
    "meta_data": [
    {
    "key": "tinx_b2b_customer_no",
    "value": "12396"
    },
    {
    "key": "tinx_b2b_customer_price_group",
    "value": "Wholesale"
    },
    {
    "key": "tinx_b2b_customer_discount_group",
    "value": "Electronics"
    },
    {
    "key": "tinx_b2b_payment_method",
    "value": "Invoice"
    },
    {
    "key": "tinx_b2b_shipment_method",
    "value": "PostNL"
    },
    {
    "key": "tinx_b2b_allow_discount",
    "value": "1"
    },
    {
    "key": "tinx_b2b_campaign",
    "value": ""
    }
    ] ...
  • POST /wp-json/wc/v3/products
    PUT /wp-json/wc/v3/products/133

    Request Body (POST/PUT):

        
    ...
    "meta_data": [
    {
    "key": "_tinx_item_discount_group",
    "value": "Shoes"
    }
    ] ...