Issues in creating migration Invoice

57 views
Skip to first unread message

vivek rao

unread,
Apr 23, 2024, 5:22:31 AM4/23/24
to Kill Bill users mailing-list
Hello

In our billing solution Usage Plugin is providing the Usage quantity for each Unit types to KB using which KB is generating the USAGE Line items in the invoice.
Thereafter Invoice Plugin is adjusting the invoice line items by adding EXTERNAL_CHARGE line items for any discounts to be provided for each Unit Usage Types as per our business logic.

This is made working and to some extent we are able to generate new invoices through KB system.

Now we are testing how to migrate all our historical invoices to KB system.
We are reading our old billing system DB and creating Migration invoice in KB with older targetDate add providing list of Invoice Items of USAGE Type(for each of our supported units) along with list of Invoice Items of type EXTERNAL_CHARGE(for discounts of each type of Usage Unit types as applicable) in the request body.

We found following issues:
1. For a USAGE Line item corresponding itemDetails available in the request body is not getting saved in the DB.
This is very important for us because this is where we will be getting important details about the invoice line item
tierUnit : this will be indicating the unit for which this line item belongs to.
tierPrice : this will be indicating the unit price
quantity : this will be indicating the quantity of the unit which is billed for

Without these information in the invoice line items there is no use of creating migrating invoice.

2. We have also updated the request body with the rate and quantity for the line item but what we found is that only rate is getting saved in the DB, quantity is not getting updated in the DB.

Could you please recreate this scenarios in your env and lets us know if it a bug/known issue or any solution available for the same.

Thanks
Vivek

karan bansal

unread,
Apr 23, 2024, 1:49:24 PM4/23/24
to Kill Bill users mailing-list
Hi Vivek,

I need further details to completely understand the issue. Could you please share a sample invoice that you wish to migrate, an example api call and endpoint used for recording the usage. I am checking this endpoint for recording usage and it does not have fields like rate. Ideally the tiers/prices should be taken care of by the catalog in Kill Bill system.

Regards
Karan

vivek rao

unread,
Apr 23, 2024, 1:58:33 PM4/23/24
to Kill Bill users mailing-list
Issue is in migration invoice api. 


You can try creating a migration invoice which has a Usage Line Item in the request body which has itemDetails. 

vivek rao

unread,
Apr 25, 2024, 6:31:50 AM4/25/24
to Kill Bill users mailing-list
Any update on this issue?

I have seen the code and it looks like the mentioned params are ignored and not set in the DB.

InvoiceItem.png

InvoiceItem-1.png

karan bansal

unread,
Apr 25, 2024, 2:13:07 PM4/25/24
to Kill Bill users mailing-list
Hi Vivek,

You are correct. I tried the migration API and it does not save the quantity in the DB. I am discussing this further internally. 

Regards
Karan

vivek rao

unread,
May 5, 2024, 11:00:36 PM5/5/24
to Kill Bill users mailing-list
Hello,

Any update on this issue?

karan bansal

unread,
May 6, 2024, 12:09:44 PM5/6/24
to Kill Bill users mailing-list
Hi Vivek,

We are still discussing this internally if the rules around this can be relaxed. I will let you know as soon as I hear further.

Regards
Karan

Reply all
Reply to author
Forward
0 new messages