Jump to content

Re-Use Product ID


yggdrasil

Recommended Posts

I'm having a nervous break down with WHMCS on how to solve this for months. I need to create some temporary services. Think of cloud instances which are used for a few hours while not that exactly use that as example, what I did in the past for some services is just NOT use WHMCS for product management at all and just use the API and hooks to bill them. The product ordered is just for that, and the customers actually manages things out of WHMCS.

 

The reason is that WHMCS is product centric only and that is horrible for temporary products or cloud companies. Imagine a paid ticket used one time. Or a cloud instance launched for 2 hours, then terminated, then launching another one for 4 hours and so on. If you are still with me here you probably see the problem with this approach. The user will end up with junk products in his account. Imagine that WHMCS creates a unique product ID for each product and service sold to the customer. Not only will your product ID sky rocket this way, the customer have hundreds of terminated products making it hard to manage his active products but it will be a huge administration mess.

 

The proper way and solution is to re-use the product and ID for this specific type of services.

 

So lets say customer orders the product and its activated with product ID 100. When terminated, if he orders the same product again, instead of creating a new 101 product and leaving the 100 terminated, WHMCS can just reactivate the ID 100 product with different details. This would be perfect for those kind of products because it's the same type of product.

 

Right now I just decided not to use WHMCS for this reason for some products which neglects the idea of having WHMCS for automation. I find myself using it less and less for temporary, metered cloud type services, in particular as WHMCS can't do hourly billing either and the not being able to re-use the ID properly makes it a mess. I don't think you want to end up with product ID 3494544554 in your installation and having to browser trough 1 million records to find one active. I know people are complaining about WHMCS not being cloud ready for years, same was true for VPS and Server management, but I find it a bit shocking that WHMCS is planning into the future without this. Having to buy gazillion addons which mess up the billing system and are buggy is not a solution. Its paying more money to solve a problem that WHMCS is suppose to do.

 

Don't get me wrong. I love the unique product ID numbering and its required to uniquely identify products and services but in this case its mostly worthless. Maybe I'm missing something but I can't find a proper way to use WHMCS for this. The billing part can be solved by billing users manually and with credits, but it's the product part which I'm trying to solve. I don't want to create junk in the database.

 

Does anyone has a better idea here on how to manage temporary products which can be killed and recreated constantly?

Link to comment
Share on other sites

You can't do that. WHMCS assigns an ID to each user, product, etc.

 

Each time a product is ordered, it gets its own unique ID.

 

If you mean not using products in WHMCS and just do it externally, that is what I do so far. The product is just a fancy log into an external systems and each system/product does not exist in WHMCS, they are just billed in WHMCS with an API/Cron.

 

My idea was try to use a WHMCS a bit more. With some hacking this could be possible, using hooks and the API, you can modify all the products ID with the new information, so this way you could reactive the same product ID and just fill the new details and re-use them over and over again. Still, WHMCS has no hourly billing which means the whole thing is a complete mess and you are just better off not creating the products in WHMCS and just using WHMCS for the invoices and charges only. The point is that WHMCS then does not only not manage the product but doesn't calculate the billing either. If you do this all externally, I can just bill customers with something like Quickbooks and not even use WHMCS. WHMCS is just very poor when it comes to cloud billing today and would require amazing amount of hacking the code.

 

It is possible because there are some modules, but it seems I depend on more and more modules every day. At least they added Stripe now which is a step forward, but WHMCS has a lot of work to do in this regard.

Link to comment
Share on other sites

When a product is created there is a first associated invoice.

Then depending on the payment method (monthly, annual, etc) is re-invoiced according to the value found in the product (client product id)

You can use that field to add the value and on the due date WHMCS invoice that value.

 

I don't know what product you want to sell. Maybe exists a module that allows you to solve your problem.

 

I have a contrary idea to yours regarding the core and modules. The core should be, to my way of seeing, the solution to the most common scenarios. The modules arrive to allow more complex scenarios.

 

Thinking about the subject again: You have a product base and the time of use could be calculated an overage.

For example. WHMCS calculates and invoices bandwidth overage. Perhaps a similar concept can be used in that case.

 

The idea is to help, the discussion take off new ideas

Link to comment
Share on other sites

I do agree with you in the core part and the rest should be with modules separated. But WHMCS should ship or develop modules for basic functionality. Having so many third party modules leads to delayed upgrades (you need to wait until they upgrade first), increased security risks for the same and just bugs and problem with things that don't play nice. The core has no benefit if are no basic features. WHMCS still lacks some API's for example, and while they have tons of hooks, the API side is a bit lacking, I don't like hooks they are slow and you can't control the execution time precisely. I want more API calls which can be used internally and externally as opposed to hooks. Basic functionality for example is hourly billing or anything related to metered billing, WHCMS can't do this today.

 

You can calculate hours in WHMCS but with the API and then bill manually, you can't do this directly on products for example or mix billing periods. I want to mix for example hours and monthly, users receives a normal invoice each month but if the cancels first, are billed only for the hours used. You can actually do this with WHMCS but using API and hooks, not out of the box and you still have problems like the users getting the invoice on the billing date which you can't avoid, skip or not letting you change the invoice sending per product (its global in WHMCS settings how many days before you want to invoice), you can't change this per product or customer accounts. So there is some granularity missing as well. Pro rata billing is also a basic basic and lacking.

 

Let me make one example of what you could be selling and it would cause tons of garbage in WHMCS. Paid tickets. A ticket is paid once. You can do this by setting a one time payment product. But if the user now creates 400 paid tickets in a year, he will have 400 terminated products in this account. You see the problem?

 

Of course you can say, don't use products here, just bill the ticket but that was just one example. Some things require a product because once ordered the user has to access the product to get information or manage it. But maybe its not a monthly product but something that needs to run only 3 days. With cloud services this is very common actually, developers only test and use things for a few hours, not a full month.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated