VTEX Commercial conditions
How to configure VTEX commercial conditions with V2 Widget
VTEX allows merchants to use commercial conditions to group a set of products (SKUs) on the platform. Through these commercial conditions, VTEX allows the merchant to decide by which payment condition (payment method) to process the buyer's transaction.
For more information about commercial conditions in VTEX, we invite you to check the following link: What is a commercial condition in VTEX?
Benefits
VTEX allows configuring different payment providers and associating them with payment conditions in which you can activate specific commercial conditions (SKUs). However, this process can present some challenges:
- Provider limitations: Some payment providers you use might not be available in VTEX connectors. Therefore, you couldn't associate a commercial condition to an unavailable provider.
- Embedded payment enablement: Unlike VTEX, which currently doesn't support the use of payment conditions in embedded modalities (payment app) due to limitations in its payment protocol, our Widget allows integrating these functionalities, offering an improved payment experience.
- Payment experience: Not all providers in VTEX offer an embedded checkout experience. Configuring different providers results in the appearance of multiple buttons in checkout, which can confuse the buyer and negatively affect the shopping experience.
- Simple configuration: With the DEUNA widget, you only need to configure one payment condition (DeunaNow) to manage all desired commercial conditions from a single payment condition.
With these advantages, the DEUNA Widget not only improves functionality and efficiency when using VTEX, but also elevates your customers' shopping experience.
Requirements
- Installments configured in DEUNA
- VTEX credentials provided to DEUNA team
- PSP credentials to perform configuration in DEUNA
Steps
- Configure PSPs in DEUNA for commercial conditions
- Configure payment method in VTEX
- Configure rules in DEUNA to process installments with commercial conditions
Step 1: PSP configuration in DEUNA for commercial conditions
Before performing configuration in your VTEX store, it's important that you can configure your PSP in DEUNA. To do this, you must follow these steps:
- Enter your DEUNA administrator with your username and password. Then select the "Connections" module
- Add your PSP and configure credentials. To support commercial conditions, we suggest adding multiple connections of your PSP using the following nomenclature:
PSP Name - VTEX commercial condition name
Nomenclature details
- PSP Name: Name of the PSP you are configuring. Example: Mercadopago
- VTEX commercial condition name: The name that identifies the commercial condition you will use, which is built by: condition name + percentage of rule activation in VTEX. Example: stationary items > 20%
To find more examples of commercial condition names, we suggest reviewing the section: Example table for commercial conditions with identifier for DEUNA
In the following tutorial we show you how to perform this configuration
Once you finish this configuration, you can proceed to the next step.
Step 2: Payment method configuration in VTEX
To ensure that DEUNA correctly identifies commercial conditions in VTEX, it's essential to perform proper configuration in the DeunaNow payment method. Here we explain the step-by-step process, including how to use the correct nomenclature so that your widget supports installments with commercial conditions
- Add a payment method: Add DeunaNow payment method. We recommend using a descriptive name that identifies the name of the rule you will use. (In the attached table you can find an example of rule name)
- Activate installments for payment condition: Once you add the DeunaNow payment method, assign a connector and add the name. You must press the "Total number of installments" option.
- Associate identifier: In the "Total number of installments" field, you must enter a combination of the maximum number of installments allowed along with the commercial condition identifier attached in the table, according to the following nomenclature:
[Maximum number of installments to show in widget],[Commercial condition identifier]
Nomenclature details
- Maximum number of installments to show in widget: Corresponds to the installment limit that was configured in the DEUNA administrator. This number defines up to how many installments can be offered to the customer during the purchase process.
- Commercial condition identifier: It's a number assigned to each commercial condition, established in the attached identification table. This identifier allows DEUNA to recognize the specific commercial condition applied to the transaction.
Practical example
If you have a commercial condition that allows payments up to 6 installments and is associated with identifier 50 (stationary items > 20%) from the conditions table, you should enter in the installments field:
6, 50
This format ensures that DEUNA recognizes both the maximum number of installments allowed and the applicable commercial condition, facilitating the payment process and ensuring correct application of your store's commercial policies.
The installment "50" configuration in VTEX will not be shown as an installment option to the customer since this value will not be configured as an available installment option from DEUNA's ADMIN.
In the following tutorial we show you how to perform this configuration
Important: The installment configuration performed above is referential so that our widget detects the configuration. The commercial condition identifier configured in VTEX will not be shown to the buyer.
Step 3: Rule configuration in DEUNA to process installments with commercial conditions
After you have configured the DeunaNow payment method with the commercial condition identifier in the previous step, it's extremely important to configure the rules in DEUNA's admin. With this, our widget will be able to identify by which commercial condition to perform the payment process. To perform rule configuration in DEUNA to process installments with commercial conditions, you must do the following:
- Enter the DEUNA administrator with your username and password, and select the "Payment Strategies" module
- Press the "Create specific rule" button and add a name to the rule. We suggest using a name that allows you to identify the commercial condition rule. Then press the "Go to next step" button
- In the "Add conditions" section you must press the "Add condition +" button and you must look for the "Metadata" option
- In Metadata it's important that you use the variable name "commercial_condition", format type "Text", Properties: "({}) Contains" and add the identifier number that you used in the previous step. Example: 50 (Corresponding to stationary items > 20%)
- Once you add this information press the "Save metadata" button and then press the "Save" button to go to the next step.
- Once you return to the "Create a specific rule" section press the "Go to next step" button
- In the "Define transaction processing order" section press the "Edit routing" button, select the processing (connection) that you configured for the commercial condition. Example: "Mercadopago - Special Stationary".
- Select the processing rule and press the "Save" button. With this you have finished configuring the specific rule for your commercial condition.
In the following tutorial we show you how to perform this configuration
To find more examples of commercial condition names, we suggest reviewing the section: Example table for commercial conditions with identifier for DEUNA
Example table for commercial conditions with identifier for DEUNA
In the following table we provide you with an example of commercial condition names, with a suggested identifier. The commercial condition rule name refers to the name of the commercial condition you have in VTEX, on the other hand we suggest using a number greater than or equal to 49 to be able to identify it in DEUNA.
This number will be the one you configure within the DEUNA administrator when configuring processing rules for the PSP.
We add the following table with suggested examples for identifying your commercial conditions, where:
- Commercial condition rule name: It's the name of the commercial condition followed by the rule you configure in the payment method that is valid
- Identifier: Identifier used by the DEUNA widget to be able to identify which commercial condition should be used. This identifier will be used when you perform the Installment configuration step with VTEX commercial conditions support. The identifier must be greater than or equal to number 49
# | Commercial condition rule name (example) | Identifier |
---|---|---|
1 | tech items > 10% | 49 |
2 | stationary items > 20% | 50 |
3 | stationary items > 10% | 58 |
4 | preventa clothing items > 1% | 51 |
5 | stationary special items > 20% | 52 |
6 | clothing items > 20% | 53 |
7 | grocery items > 20% | 54 |
8 | personal care items > 20% | 55 |
9 | giftcard items > 20% | 56 |
10 | preventa tech items > 1% | 57 |
What is a commercial condition in VTEX?
A commercial condition in VTEX is a resource that allows merchants to group different products (SKUs) to define specific payment scenarios (payment conditions) on the platform. When configuring your payment condition with special payment conditions, you can activate the commercial condition. VTEX allows you to establish, based on a percentage of the cart total, when that commercial condition will be activated. For example, let's consider a VTEX store where you sell the following products:
Product name | Value |
---|---|
T-shirt | 1000 |
Pants | 1500 |
Shirt | 1200 |
Dress | 2500 |
Cell phone | 5000 |
Computer | 10000 |
Tablet | 6000 |
As the store owner, you might want to establish commercial conditions that group products into categories like Clothing and Technology. Additionally, you might want Clothing transactions to be processed through MercadoPago (payment condition) and Technology through Stripe (payment condition).
You could configure the rules as follows: if the total of Clothing products exceeds 20% of the cart total, then they will be processed by MercadoPago. Similarly, if the total of Technology products exceeds 20% of the cart total, then they will be processed by Stripe. Here's how it would be configured:
# | Commercial condition in VTEX payment condition | Associated products | Result |
---|---|---|---|
1 | Clothing > 20% of cart total | T-shirt, Pants, Shirt, Dress | Process by MercadoPago |
2 | Technology > 20% of cart total | Cell phone, Computer, Tablet | Process by Stripe |
Example scenarios:
- Scenario 1: A buyer purchases 10 t-shirts and 10 pants, and also buys 1 cell phone.
Product | Quantity | Commercial condition it belongs to | Total |
---|---|---|---|
T-shirts | 10 | Clothing | 10000 |
Pants | 10 | Clothing | 15000 |
Cell phone | 1 | Technology | 5000 |
CART TOTAL | 30000 |
The Clothing commercial condition, which exceeds 80% of the cart total, will be processed through MercadoPago. On the other hand, the Technology condition, which represents 16% of the total, is not activated.
- Scenario 2: A buyer purchases 1 cell phone, 1 computer, 1 tablet and 1 t-shirt.
Product | Quantity | Commercial condition it belongs to | Total |
---|---|---|---|
Cell phone | 1 | Technology | 5000 |
Computer | 1 | Technology | 10000 |
Tablet | 1 | Technology | 6000 |
T-shirt | 1 | Clothing | 1000 |
CART TOTAL |
The Technology commercial condition exceeds 90% of the cart total and will be processed through Stripe, while Clothing, which represents only 4.55%, is not activated.
In summary, commercial conditions in VTEX allow the merchant to process transactions through different payment conditions (payment methods like MercadoPago or Stripe, etc), depending on the configuration made based on the cart total percentage. This facilitates the management of different PSPs according to payment configuration.
Updated 3 days ago