Product Parent/Child relationships

Product Parent/Child relationships

Because of our unique situation we need to have parent products with child products nested with them. Zoho Books doesn't allow for this, so we used a custom module in CRM to create a parent child association along with a custom function to populate them on a sales order.

Now the problem comes when we pass the sales order to Books as an invoice, we are loosing the parent child association and now they are all flat on the invoice. Another part of the dilemma is that we have one child associated to many different parents.
Product 1
 Product 2
 
Product 3

Child a
Child a
Child a

Child b
Child b


Child c

When we fulfill their software and build activation keys, we need to know what children the product (parent) has. Reason for this, is that after the invoice is created in Books, sent to the customer for payment, we are sending the information from the invoice to our key gen software to set their software keys. If we don't know the parent then we can't set the keys, they will all become 'parents'.

Any ideas how we could fix this?