Syncing users with a data source
Sync your user database with a data source.
You can manage your users entirely in Softr or sync users with an external data source. By connecting to a data source, you get to use additional custom fields to create user groups and application logic.
To start the setup, you need to hit the Connect to data source button as shown below.
Next, you need to select the data source you want to map to.
In the next step, you need to map Softr user fields to fields in your data source:
- Email * — this is the unique user identifier and how we are able to connect user records. Please do not edit email from the source.
- Name (optional)
- Magic link (optional)
- Avatar (optional) — instructions on setting up avatar can be found here
- Created date (optional) the date when the user was created
- Last seen date (optional) — the date when the user last used the application.
After mapping all the fields you want, hit Save – now the syncing will start!
How does 2-way syncing work?
- Adding user: Any user created via Softr will get added to your connected source, and vice versa.
- Deleting user: Any user deleted via Softr will also get deleted from the source. However, deleting a user from source will not delete user in Softr, and the user will be added back in the next sync (we do this to prevent unrecoverable mistakes).
- Changing user data: Fields such as
Last seen dateand
Magic linkonly make sense to be managed via Softr. If you edit the value from the source, it will be overridden on the next sync.
When does syncing happen?
Technically speaking, syncing doesn’t always happen in real time. However, we’ve defined many syncing triggers to ensure your app always gets the latest user data when it actually needs it. A few examples:
- When a user logs into an app.
- When you publish new app changes.
- When you visit the User tab.
If you run into any cases where the data isn’t getting synced, and it’s affecting how your app works, please let us know!
If there’s an issue with syncing with a data source (e.g. you have a duplicate user in your data source), you’ll be notified about that as shown below.
Click on See details to learn more and address the issues. After successfully fixing the issue, hit Validate fix to trigger a sync.
Enabling 2-way sync on older apps
User syncing between Softr and data source used to be 1-way (from application to data source only). If you have an app created before the introduction of 2-way sync in June, 2023, you’ll have to manually enable 2-way sync by going to the Users tab.
Last updated on June 20, 2023