#zach_best-practices

1 messages ¡ Page 1 of 1 (latest)

oak islandBOT
#

👋 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/1293286895907770390

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

dry warren
#

Hello

#

Apologies for the delay

quartz bloom
#

Hi

#

No worries

dry warren
#

I'm not sure I fully grasp your question.
Specifically

Depending on an action (which in this case will be the domain of the url where the meter event is being triggered from), I want to be able to see the makeup of events from one action (url) from another.
Can you share maybe an example so that I am on the same page?

quartz bloom
#

The url is just an example. Essentially it's just extra meta data that I would want to be able to report on.

#

I want to be able to view reporting that breaks out meter events based on a certain parameter, and ideally have only one invoice for users.

#

Nothing about the product or pricing is different based on these "actions"

#

User meter events:
Product-1, Price-1, Meter-1, Blue Button
Product-1, Price-1, Meter-1, Red Button
Product-1, Price-1, Meter-1, Blue Button
Product-1, Price-1, Meter-1, Blue Button

Results in:
3: Subscription-1, Blue Button
1: Subscription-1, Red Button

dry warren
quartz bloom
#

Yes, that is what I am using. But the event_name maps to the meter event name defined in the UI, correct?

#

It seems there is a 1:1 relationship between meters and meter events, so I don't think that necessarily helps me.

#

If I create multiple meters, each with a distinct meter event name, then I think I would need to create distinct products and prices to map it to, which seems like a lot of setup for what I'm trying to accomplish, so just want to see if there is a way to avoid all this overhead.

dry warren
#

Gotcha. You can use the same product/price but with a different meter though right?

quartz bloom
#

I don't think so

#

It seems like you can only map one meter to one price

dry warren
#

Ah yup

#

you're right

#

sorry the meter API is relatively new so I don't know a ton about it

#

but yeah looks like you'd need to create distnct objects for the usecase

quartz bloom
#

I could maybe create multiple prices for a product, each mapping to it's own distinct meter, even though the price amount will be the same

#

Do you know if I take this approach if a customer will receive one or multiple invoices? Ideally it's just one.