Skip to main content
Updates welcome screen elements including welcome message, description, starter prompts, timestamp, and agent icon by modifying the agentWelcomeContent Redux state. This method enables dynamic customization of the chat interface’s initial appearance and content. The method accepts a configuration object that defines the properties of each welcome screen element. You can call this method at any time to change the current welcome screen display.

Syntax

Parameters

object
required
Configuration object containing welcome screen element definitions. All properties are optional.

config properties

string
Primary greeting heading that is displayed as large text. Supports Markdown formatting.
  • Character limit: 150 characters (capped at 4 lines in the UI)
  • Default behavior: When omitted, the previous Redux value is retained. To remove the welcome message, set it to an empty string ('').
For an optimal experience on the chat welcome screen, keep the welcome message to 100 characters or fewer. Concise messages improve readability and help ensure consistent display across screen sizes and devices.
string
Supporting information that is shown as subheading below the welcome message. Supports Markdown formatting.
  • Character limit: 1000 characters (capped at 2 lines in the UI)
  • Default behavior: When omitted, the previous Redux value is retained. To remove the description, set it to an empty string ('').
boolean
Controls whether the current time is displayed in the top-left corner of the welcome screen.
  • Default behavior: When omitted, the previous Redux value is retained.
array
Array of interactive prompt cards. One to three cards display in a static grid, and four or more cards display in a horizontal carousel.
  • Default behavior: When omitted, the previous Redux value is retained. To remove all prompts, set it to an empty array ([]).

starterPrompts item properties

string
required
Unique identifier for the prompt.
string
required
Main heading of the prompt card.
  • Character limit: 1000 characters (capped at 2 lines)
string
Supporting text below the title.
  • Character limit: 1000 characters (capped at 2 lines)
string
required
The actual text sent to the agent when clicked.

agentIcon property

string
Visual identifier that persists beyond the welcome screen. Accepts a URL string.
  • Supported formats: External URL, SVG data URL with base64 encoding (recommended for SVG), PNG, JPG, SVG
  • Default behavior: When omitted, the previous Redux value is retained. To remove the icon, set it to an empty string ('') or null.

Returns

Returns a void operator.

Examples

The following example shows a full configuration with all available properties:
The following example shows a minimal configuration with only the welcome message:
The following example demonstrates removing the agent icon by setting it to an empty string:
The following example shows how to hide the timestamp:
The following example demonstrates removing all starter prompts:
The following example shows a custom icon loaded from an external URL:
The following example demonstrates using a base64-encoded SVG data URL for a custom icon:
The following example shows four starter prompts that will display in a carousel:
The following example demonstrates a personalized greeting using JavaScript variables:
The following example demonstrates multilingual support with emojis:
The following example shows how to hide all welcome screen elements:
Alternative approach: You can also hide the welcome screen by configuring the agent settings in the watsonx Orchestrate UI. This provides another way to control welcome screen visibility without using the updateWelcomeScreen() method.

Considerations

Property behavior

When a property is omitted from the configuration object, the previous Redux state value is retained. This allows for partial updates without affecting other properties.
Important: When you omit a property from the updateWelcomeScreen configuration, the system uses the previous value that is stored in Redux. This means that previously set values persist unless explicitly overridden. To reset to defaults, you must explicitly set the property, for example, empty string for text or empty array for prompts.

Empty string vs null vs omitted

Examples:

Character limits and line capping

The UI enforces character limits and line capping to maintain a clean interface:

Merge strategy

The method uses a deep merge strategy with array replacement:
  • Objects: Deeply merged (nested properties combined)
  • Arrays: Completely replaced (not merged)
  • Scalars: Replaced with new values
When both programmatic configuration and API responses are present:
  1. API calls are always made.
  2. Programmatic values take precedence over API values.
  3. API fills in missing fields with defaults.

Content formatting

Customization of the welcome screen’s visual style is not supported. Only the default welcome screen design is applied. Text content can be modified; however, no formatting is supported. Any Markdown or HTML syntax that is provided in the text is rendered as plain text and is not interpreted.

Limitations

  • Only text content can be updated.
  • Styling, layout, and formatting cannot be customized.
  • Markdown and HTML tags are not supported and display as plain text.

Starter prompts display

  • One to three cards: Displayed in a static grid layout.
  • Four or more cards: Displayed in a horizontal slider or carousel.
  • No quantity limit: Supports unlimited number of prompt cards.

Timing

Important: Do not call updateWelcomeScreen() before the chat instance is initialized. The method requires an active instance and will fail if called before the onLoad callback fires.
The method can be called immediately from onLoad without waiting for chat:ready:

Layout support

Welcome screen customization is available for the following form layouts:
  • Floating: Floating chat widget.
  • Custom: Custom implementations (including side panel).
  • Fullscreen: Fullscreen chat interface.
  • Standalone: Not supported (embedded chat only).

Agent icon persistence

The customized agent icon is currently supported only on the welcome screen. It is not displayed in the chat view or across the session.

Error handling

The updateWelcomeScreen() method validates input and throws errors for invalid configurations:
Common error scenarios:
  • Missing required properties in starter prompt objects (id, title, prompt).
  • Invalid data types, for example, passing a number instead of a string.
  • Malformed URLs for agentIcon.

Best practices

Review the following practices for creating better starter prompts.

Provide meaningful starter prompts

Keep text concise

Respect character limits and line caps for optimal display. Test with long text to verify how your content appears when truncated.

SVG icon formats

SVG icons can be provided in multiple formats:

Call early in lifecycle

Personalize when possible

Use user context to create relevant experiences.

Support internationalization

Test with multilingual text and emojis to ensure proper display.

Do you need practical examples?

Learn how to apply the features available for embedded chat into your implementation with guidance and examples.