User sync between Zuora Billing and Zephr
Synchronize users and subscriptions between Zuora Billing and Zephr to manage user grants effectively.
With the Zuora Billing extension enabled, you can synchronize Zuora users and Zephr user subscriptions to give Zephr users the appropriate grants.
To enable user sync, you need to use the Zephr Admin API to link a Zephr user with one or more Zuora customer accounts. Then, use the Zephr User Sync API to trigger the sync between Zuora and Zephr for a user. You can also automate the user sync process for certain events by setting up callouts on the Zuora Billing side.
Link a Zephr account to a Zuora account
To link a Zephr user to a Zuora account, you need to use the Zuora customer account ID as the foreign key. One Zephr user can be linked to many Zuora accounts, which means a Zephr user can have multiple Zuora accounts with multiple subscriptions.
After an account is created in Zuora, you can use the Upsert Foreign Key Zephr Admin API to link it to a Zephr user by upserting a foreign key in the Zephr user foreign key table.
The following is an example request:
PUT REQUEST https://{tenantId}.api.zephr.com/v3/users/{zephr_user_id}/foreign-key/update/zuora_account_id
user_id: This is a Zephr user ID.foreign_key_system: This should always be `zuora_account_id`.foreign_key: This is a Zuora account ID.
You can trigger the user sync by calling the following API:
Trigger user sync
POST REQUESThttps://{site}/zephr/subscriber/access/sync{
"external-customer-account" : {{zuora_account_id}}
}Synced successfully
Code: 200
Message: Synced successfully