#mytras-formo_api

1 messages ¡ Page 1 of 1 (latest)

mental tendonBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1262686458662096917

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

rustic cove
#

Hi, let me help you with this.

topaz gust
#

hi

rustic cove
#

The line items is an array which suports multiple items, what's the challenge exactly?

topaz gust
#

I am receiving information in a payload from a different platform, I need to add multiline items to the invoice with the correct product

#

I usually do a search product by name and metadata

#

that is how I add the correct product to the empty invoice

#

To make sure that we are charging the correct item with correct description to the customer I need to do a search

#

or is it possible to just create new line items without the need of having a product?like it happens in different billing platforms?

rustic cove
#

Not sure I understand the problem. Is it about multiple line_items? Or searching for the correct Product? Or creating Prices on the fly/dynamically?

topaz gust
#

It is a bit tricky to explain

#

let me show you a couple of screenshots

#

These are the steps that I create in my automation in Zapier

#

I first create an empty invoice, than I fill the invoice with the items needed for the invoice

#

addding the correct price

#

in order to add the items to the invoice I need a price id, or so I believe, is there a way to not need that and create dynamic items that will not need to be created before hands?

rustic cove
#

Right, sorry, Invoices don't have the line_items parameter. You have to make separate calls to create Invoice Items.

#

However, you will still need to use a Product ID.

topaz gust
#

oh ok, than it will be easier to create the product before hand

#

so basically, if the invoice needs to contain more than 1 item

#

I need to repeat the step to create an invoice item for as many time as the products are that I want to add to the invoice

#

correct?

rustic cove
#

Yes

topaz gust
#

ok I will give it a try

#

thank you so much

#

Have a great day

rustic cove
#

Happy to help.
You too