Configuration timing and lifecycle
Apply configuration early. Configure the Assistant as soon as it’s ready (after theready event) and before users interact with it. This ensures a consistent experience from the start.
Configure before navigation. If you’re navigating to specific routes, set your configuration first to ensure the target page loads with the correct settings.
Reconfigure dynamically. You can update configuration at any time during a session. This is useful for:
- Adapting to different user roles or contexts
- Responding to user preferences changes
- Switching between different workflow modes
Incremental configuration
configureApp() is patchable, so you can send only the settings you want to change. Settings you omit keep their current values:
- Send only
uito change which interface elements are visible. - Send only
appearanceto change branding. - Send only
localeto change language settings.
Error handling
Handle failures when you callconfigureApp() or setInteractionOptions(). Both can fail with INVALID_PAYLOAD or INTERNAL_ERROR.
- Validate before you send. Check values such as colors and language codes against Supported values so an invalid value doesn’t reject the call.
- Handle failures. Catch the error and decide whether to retry or continue with the Assistant’s defaults.
- Log errors. Record the error code in your own logs for debugging without interrupting the user.
Performance
- Batch configuration changes. To change several settings, use a single call instead of several separate calls. See I need to configure several settings together.
- Reuse one configuration object. Keep your configuration object in your own code and reapply it each time the Assistant loads, instead of rebuilding it.
- Minimize reconfiguration. Update configuration only when user preferences or context actually change.
User experience guidelines
Match user workflows. Configure features based on what your users actually need. Consider:- Which features do users need for their tasks?
- What can you simplify or hide to reduce cognitive load?
- How does the Assistant fit into the broader application workflow?
- Use interface language settings that match your application’s user preferences.
- Set the dictation language based on the language users actually speak.
- Consider letting users change settings if navigation is enabled.
- Configure differently for different user roles, such as physicians and nurses.
- Adapt configuration to the consultation type, such as virtual or in-person.
- Consider workflow-specific configurations for different use cases.
Security and compliance
Keep sensitive data out of configuration. Configuration values are visible in client-side code. Never include API keys, tokens, or personal data in configuration. Validate permissions server-side. If you configure the Assistant based on user roles or permissions, validate those permissions on your server before you apply the configuration. Check compliance impact.- Ensure customizations maintain compliance with relevant regulations, such as HIPAA and GDPR.
- Document any customizations that affect compliance.
- Test that disabled features don’t affect required functionality.
Testing recommendations
Test all feature combinations. Test how different combinations of UI settings affect the interface and functionality. Test color customizations thoroughly.- Test with a range of color values.
- Verify accessibility in all states. See the color customization checklist.
- Test at different screen sizes and resolutions. See minimum supported resolution.
- Verify that all supported languages work correctly.
- Test combinations of interface language and dictation language.
- Confirm that string overrides work as expected.
Related pages
- Embedded API configuration scenarios: Examples for each configuration option.
- Display requirements and accessibility: Minimum sizes and WCAG 2.2 AA guidance.
- Embedded reliability, timeouts, and recovery: Handle lifecycle events that don’t arrive.