Automations

I see there are some automations, mainly for sending emails. Is there a way to do something custom?

I am adding a subscription option, so I created a plan. When someone buys a plan, I need to update a database. I am not able to find any help on doing something like that.

Any help is appreciated.

thank you so much!

You can use onPlanPurchased()

Thank you so much shan. That works, the event gives me the userId, which is a guid. Where do i see the database of Site users? I dont see it under the databases section.

If you have installed the Wix Member’s Area then you can see the database on the left hand panel

You can query this collection from a backend .jsw or .js file while suppressing authorisation .

wixData.query('Members/PrivateMembersData)
.eq('_id, idFromPlan)

@shantanukumar847 got it… that would work. We don’t have access to a database that only has Site Users (those who purchased plans), do we? PrivateMembersData seems to contain every user who created an account, through the sign-up process.