Creating invoice lines dynamically in sage cloud

Hi all, and thanks for reading this:

In my company layout, we register jobs as airtable records, long lines with all the data including the job number, operator, and billable costs for the service. Sometimes there will be transport cost, or a parking cost, or the service will be over a videocall. Some of the items will have a value or be void, depending on the type of service. In turn, in sage business cloud, we have listed all the items we can bill a client for to create an invoice.

When a job is completed the following sequence is triggered:

  • an automation in airtable triggers a script that feeds the job number to the webhook
  • an airtable “get a record” module finds and loads all the information about this job. This includes the items to bill for, and their value. Items that are not billable are empty values
  • a sage business cloud “search customer” module identifies who has to be billed, using the client code included in the airtable’ get a record" module.

We have now triggered the sequence, found the record on airtable, and found the customer on sage, all linked together.

  • I now call up a “Sage business cloud” module to create a customized invoice for this customer with the available data. However I have now got to create “invoice lines” only for the items to be billed, and these will vary from invoice to invoice.

How can I set up to dynamically create and customize the invoice lines to be billed in each case, and fill in the values? these should be correlated to the list of item services created in sage so we can incorporate to the accounting.

many thanks for your help and pointers