Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Rental Prices in Optimizely Pricing Engine

Vote:
0

On our website, we offer a service that allows customers to hire or rent a specific product with a defined start and end date. After reviewing the Optimizely Pricing Engine, we found that it does not currently support this feature. To implement it, we would need to customize the engine in several areas, such as promotions, orders, etc.

Is there an out-of-the-box solution from Optimizely that we might have missed? If not, could you advise on the best approaches to implement this feature, particularly if you've encountered a similar case before?

Thanks in advance for your support!

Please note that the version for the Commerce and CMS as follows:
CMS 12
Customized Commerce 14 

#337172
Mar 11, 2025 12:55
Vote:
0

I don't believe there's an out-of-the-box solution, but if you have a software developer customize the code, you can override the current functionality to meet your requirements.

I assume that, depending on the number of days, a product would have a set price per day. If that assumption is reasonable, then you could:

The simplest way is to store a daily rate against a Variant. If a customer wants to hire a product for 10 days, the price would be variant price × quantity (in business terms, "daily rate of product × number of days in the selected period").

If you need pricing bands, you could store the number of days as periods and associate different prices with them. For example:

  • Hiring for 10–20 days costs £100 per day.
  • Hiring for 20–30 days reduces the rate to £90 per day, and so on.

You could implement this in a few ways:

  1. Use the Product / Variant relationship in the Commerce Catalog, where a variant represents a period.
  2. Utilize the Customer Group functionality within the variant. This is a slightly more complex alternative but still viable.

To ensure that Promotions and Orders automatically align with your pricing logic, you would override IPriceService, which is the main service called when querying a price. With context (e.g., the number of days selected), you can adjust the price that gets returned.

Additionally, Customer Pricing within variants allows you to specify different prices with expiry dates.

Ultimately, the level of customization required depends on the complexity of your needs. That will determine whether an out-of-the-box approach is sufficient or if a more tailored solution is necessary.

#337225
Mar 16, 2025 19:13
Vote:
0

Thanks Surjit for the reply, 

We were thinking of implementing something similar to what you provided above (we will need to keep the quantity as the customer can rent two of item X for a period of 1 week, for example).

However, our concern is that when we use something like the context mentioned above, how will I make sure that any internal calls between the modules (Promotion, Basket, etc.) will define this context correctly?

I can pass it correctly in the controller, for example, but if it's an internal call, I'm not sure how I can pass it and populate it correctly.

I hope i am making sense :P

thanks in advance

regards. 

#337258
Mar 19, 2025 14:13
Vote:
0

Can the period be any number of days for a given item to hire?

#337423
Mar 20, 2025 12:44
Vote:
0

Hi,

I also want to share my idea based on your requirement.
If you still want to have both functions such as  buy and rent in your system then I suggest that you can create different product/variant for buy and rent. By that way, you do not need to do any customization for buy case. So it works well as normal in buy case.
About organizing the rent variant structure, I suggest you can do such as: create different variants based on period such as: daily-based variant, weekly-based variant, monthly-based variant...
In the rent case, if the user choose a product for rent then user need to input 2 things: quantity and number of period => save into line item level in order.
How to calculate price for rent case:
- Unit price for rented product is price for renting 1 unit in 1 period and retrieved from price service as normal => Total price = unit price * number of period * quantity
- You can add custom promotion for discounting rent price based on quantity and number of period. The condition for this new promotion could be quantity of rented product, target product, rent period

By this way, you only need to:
- Creating rent variants based on different certain period (if you want or just use daily-based)
- Customize line item calculator for calculating total price
- Adding new custom promotion based on quantity of product and number of period if you want to apply kind of discount logic like that

One more case you may need to resolve when implementing rent logic it is: what happen if I want to rent 2 same products, but 1 product I want to rent 1 month and 1 for 2 months => You may need to create 2 different line items for them and check if there is any issue if we do like that.

But if you do not need to allow user to choose flexible number of periods then you do not need to do any customization except creating different variants based certain period.

#337452
Edited, Mar 22, 2025 4:46
Vote:
0

Hi Surjit Bharath 
Yes it can be any number of days,

Hi Binh Nguyen Thi,
I will check this approach and get back to you.

#337456
Mar 23, 2025 8:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.