Welcome to Zuora Product Documentation

Explore our rich library of product information

Preserve split-test groups through JWT authentication

Preserve split-test groups through JWT authentication provides you to split-test group when they authenticate with JWT by calling POST /zephr/syncFromAnonymous after the JWT is presented.

Zephr stores a visitor’s split-test group on the session and does not recalculate the group each time a rule runs..

Zephr manage registration and login

When you use Zephr-managed registration, the guest split-test group carries over if the guest session is retained.

During a standard login to an existing account:

  • If the account already has a split-test group, that group takes precedence.

  • If the account does not have a split-test group, Zephr assigns a new group.

JWT-only or non–Zephr-managed authentication

When authentication is JWT-only or managed outside Zephr, presenting a JWT does not automatically transfer the guest split-test group to the authenticated session. Identifying the user by foreign key alone also does not transfer the group.

To preserve the guest split-test group through a JWT registration or login journey, call POST /zephr/syncFromAnonymous after the JWT is presented.

Prerequisites

Before you call the endpoint, make sure that:

  • JWT User Mapping is enabled

  • The visitor’s guest session is retained throughout registration or login.

  • The JWT is present and the visitor is JWT-authenticated.

  • The request runs in the same browser context so Zephr can access both the JWT and the prior guest session.

Call sequence

Immediately after you present the JWT, call POST /zephr/syncFromAnonymous once with an empty request body. Call the endpoint before you show any experience that depends on the split-test group.

This JWT anonymous-history synchronization is performed by your frontend through the API. It is not a separate Admin Console setting or JWT claim. Use the same sequence whether login starts from a registration wall, paywall, or header link.

Effects and considerations

The call copies the guest split-test group onto the authenticated session and overwrites any split-test group already assigned to that session. Use this call only when you want to preserve the guest group.

The endpoint also copies selected guest access and history data. It does not specially copy Tracker A trial consumption, and it is not a complete merge of anonymous meter usage.

If the guest session is lost or replaced before synchronization, the guest split-test group does not carry over.