chiefonboarding / ChiefOnboarding

Free and open-source employee onboarding platform. Onboard new hires through Slack or the web portal.
https://chiefonboarding.com
GNU Affero General Public License v3.0
656 stars 121 forks source link

Sync user info #371

Closed GDay closed 11 months ago

GDay commented 11 months ago

This new feature will allow users to sync data from a third party back to the ChiefOnboarding users. It will require a new integration and will run daily.

This is especially useful if you need to call API endpoints in any of your integrations and require the ID of the user, but the API doesn't give you an option to look that ID up (for example through the email address).

The data is saved in the extra_fields field and can be used in any of the integrations and content boxes.

coveralls commented 11 months ago

Coverage Status

coverage: 93.481% (+0.07%) from 93.412% when pulling ccff08bde81dd2c1b79d47075efccfe2f66afb8a on link-user-info-from-api into 68d0de1ee39966f177fb73854cce7b8beedbe087 on master.

GDay commented 11 months ago

I had considered merging the two, but since they serve very different purposes, I decided to split them.

However, having rewritten this pretty much from scratch, I do agree that this is likely the best approach. Thanks!

There is now a schedule option which needs a cron value. We likely don't need that much flexibility (hourly or daily would have been enough), but it's nice to have it anyway (since it's supported out of the box anyway and the validation is baked in).

GDay commented 11 months ago

By the way, I have split the serializer in two for the two different manifests. I am super concerned about manifest validation/serialization at the moment, though. At some point I will make an interactive form where users can generate these manifest on the fly while also testing/debugging the requests.