# Routing changes

Summary

In the old DocCheck CReaM system, routing could be configured directly in the login client, for example by profession, country, or language. In the new system, DocCheck no longer provides a direct routing feature. Instead, your application receives the relevant data and decides where to route users.

# Then and now

Previously in CReaM Now in DocCheck Access
Routing was configured in DocCheck CReaM. Routing is implemented in your own application.
DocCheck redirected users to specific pages based on rules. Your application evaluates user data and redirects users itself.
Rules were based, for example, on profession, country, or language. Required values come from scopes and the User Data endpoint.

The advantage of the new system: website owners receive the data directly in their own application. This means they are no longer limited to fixed routing rules in CReaM and can use the data more openly, for example for custom redirects, page selection, content logic, or personalization.

# Routing with scopes

If routing should still depend on user attributes, request the matching scopes in the Button Configurator and evaluate the returned values after login.

Routing by Scope Return value
Profession profession profession_id
Country country country_id
Language language user_language
Professional details occupation_detail discipline_id, activity_id

For field details, see User Data endpoint return values.

# Mandatory scopes

If routing is important for the user journey, the required scopes should be set as mandatory scopes.

Otherwise, users can deselect optional scopes. Your application may then miss the data required for routing and needs fallback logic, such as a neutral landing page.

Recommendation

Set routing-relevant scopes as mandatory only when they are truly required for the flow.

# Implementation

  1. Check which routing rules were used in the old CReaM setup.
  2. Select the required scopes in the Button Configurator.
  3. Set these scopes as mandatory if the redirect is necessary for the user experience.
  4. After login, call the User Data endpoint.
  5. Evaluate the data in your application and redirect the user yourself.

# state vs. user data

Use state for technical or non-personal context information, for example start page, campaign, or application state.

Use scopes and the User Data endpoint when the redirect depends on user attributes such as profession, country, or language.

Important

Do not pass personal data in state or redirect_uri.