Syncing customers
To get the most out of Scalar, you should sync your customer data. This allows:
- Identifying who is submitting feedback.
- Segmenting feedback by customer traits.
- Validating feature requests against customer value.
Implementation
The primary way to sync customers is via the Upsert a customer endpoint. Because this endpoint handles both creation and updates (upsert), you can safely run it periodically or based on triggers in your system.
Trigger-based Sync
We recommend adding a hook in your backend whenever a user is created or updated.
# Example pseudo-code
def on_user_signup(user):
scalar_api.post('/customers/', {
'email': user.email,
'first_name': user.first_name,
'last_name': user.last_name
})
For detailed parameters, see the Customers API Reference.
