Any idea how to make changes to all users in my database from backend?
I wish to change the wallet balance of users from an external api. But cant figure how to use “do a search for user” because it suggest to add first item which evaluates to a single user.
Depending on how many users you have…
< 100 users (I know some people have higher/lower thresholds but for simple make changes to workflows this seems to be fine for me)
- Create backend workflow which takes User as a parameter
- Make changes to User in the workflow
Schedule API workflow on list from admin panel or use ‘Bulk’ operation from the data panel in the editor (you’ll need to deploy the new backend workflow to live to be able to use it in the live database)
> 100 users
- Create backend workflow that has an
iteration
number parameter - Make changes to User
Do a search for Users:sorted by Creation Date item # iteration
- Make whatever changes you want
- Schedule the same workflow with
iteration = iteration + 1
A note on Step 2… if a user is deleted while the workflow is running it might mean a user gets skipped. You could have a field on the User called ‘processed’ yes/no and modify it so it just Do a search for Users where processed = no:first item
and changes processed
to yes after the update.
Please im unable to do step 2,how best can it be done?
Is iteration definitely a number?
JUST FIXED IT…i WASNT SORTING THE RIGHT WAY.THANKS