Looking at a way to expire membership by removing a cutom data field

i need to edit my Sambacard setup slightly but im unsure on how to go about it.

At the moment, its set to just create a new member - like the sambacard tutorial but has an additional custom data field of VIP Level.

I need to add an additional button to the

which will show a popup (I can do this obviously) but I want it to pop up with 2 different levels of membership. The customer then pays, and the correct Level is added to the custom data field along with That Date on another custom data field.

I then want a way that after 12 months has passed from the custom data date, the VIP level is removed.

Is this possible?

Could script something on a daily trigger or program startup to cycle through the entities and check the dates.
Or ad validation on the vip discount rule ro check that ‘renewal date’ is less than 12 months or maybe add an expirery date field…

would have to trigger on work period started if it could?

An Id have no idea where to start, i can go so far with what I can do but when it comes to scripts im done

Script wouldn’t be to bad, its just the handling of the dates I always hate LOL.
Happy to help with the script mate.
Youll call a list of entities by type, which I have done with SQL but expect there is a API call for it by now.
Then do a loop through those checking the date.
Not too bigger deal :wink:
My PMS scripts would probably get you 75% of the way with the entity list and loop where rooms become loyalty cards.

1 Like

only ever read everyone saying ‘loop’ but no real idea about it…

if you could that would be amazing, im not at the tills now though or have a laptop handy so will be later in the week.

No importance either, as to be honest it isnt for me but itll be good to get it in place/

I know how script loops work, not used automation loops yet.
In this case given entity data api calls it would be just as easy to do all in a single script.Probably only needs to be half a dozen lines long.