Welcome Screen

Welcome Screen

The welcome screen is an optional home view shown when the widget is opened and
no chat session exists yet. It greets the user and lets them start a
conversation by typing a message. Once a conversation has started (or an
existing session is restored) the welcome screen is skipped.

Each feature is configured as its own object with an isEnabled flag:

window.DG_CHAT_WIDGET_CONFIG = {
  // ...
  welcomeScreen: {
    isEnabled: true,
    sectionOrder: [
      'currentProduct',
      'wismo',
      'cartPromotion',
      'buyItAgain',
      'popularQuestions',
      'featuredProducts',
    ],
    currentProduct: {
      isEnabled: true,
    },
    wismo: {
      isEnabled: true,
      formFields: ['name', 'orderNumber', 'email'],
      orderNumberRegexPattern: '^[A-Z]-\\d{4}$',
    },
    popularQuestions: {
      isEnabled: true,
      questions: [
        "What's your return & exchange policy?",
        'How long does shipping take?',
      ],
    },
    cartPromotion: {
      isEnabled: true,
      minimumCartTotal: {
        amount: '200.0',
        currencyCode: 'GBP',
      },
      rewardText: 'Free shipping',
    },
    buyItAgain: {
      isEnabled: true,
    },
    featuredProducts: {
      isEnabled: true,
      openProductPage: false,
      products: [
        {
          name: 'Ryder Funnel Neck Leather Jacket',
          price: '£399',
          image: 'https://cdn.example.com/products/ryder.jpg',
          url: 'https://www.example.com/products/ryder',
        },
      ],
    },
  },
  cartUrl: 'https://www.example.com/cart',
};
PropertyTypeDefaultDescription
isEnabledbooleanfalseShows the welcome screen when the widget opens without an existing session.
sectionOrderstring[]undefinedCustom render order of the sections. See Section order.
currentProductobjectThe "You're viewing" current product card. See Current product.
wismoobjectThe "Where is my order?" order tracking section. See Where is my order?.
popularQuestionsobjectThe popular questions section. See Popular questions.
cartPromotionobjectThe "Still in your bag" cart promotion card. See Cart promotion.
buyItAgainobjectThe "Buy it again" last-order reorder card. See Buy it again.
featuredProductsobjectThe featured products carousel. See Featured products.

cartUrl (top level, not welcome screen specific) is the absolute URL of your
cart page. It is used anywhere the widget links to the cart — on the welcome
screen this is the "Go to cart" button shown once the promotion is unlocked.

If the pre-chat form is enabled it is shown first; the welcome screen appears
after the form is submitted.

Flow configuration

Several welcome screen sections start the conversation by sending a predefined
user message as the opening turn:

SectionConfig keyOpening message
Current productcurrentProductlang.welcomeScreen.currentProduct.productMessage (e.g. Tell me more about the {name})
Where is my order?wismolang.welcomeScreen.whereIsMyOrder.track.message when an order number is collected (e.g. Where is my order {orderNumber}?), or loggedIn.trackMessage for the one-tap card (e.g. Where is my order?)
Popular questionspopularQuestionsThe question string itself, from popularQuestions.questions
Featured productsfeaturedProductslang.welcomeScreen.featuredProducts.productMessage (e.g. Tell me more about the {name}), unless openProductPage is enabled
Chat inputWhatever the customer types into the welcome screen input

cartPromotion and buyItAgain do not start a conversation and do not send a
message to the flow.

Configure your flow to match on these opening messages and respond to the
intent directly. When a conversation starts with a user message from the
welcome screen, skip any generic welcome / greeting steps in the flow and go
straight to handling that message.

Section order

By default the sections render in this order: currentProduct, wismo,
cartPromotion, buyItAgain, popularQuestions, featuredProducts. Set
sectionOrder to change it, e.g. to show the featured products first:

welcomeScreen: {
  isEnabled: true,
  sectionOrder: ['featuredProducts', 'wismo'],
  // ...
}

Unknown section names are ignored, and any enabled sections missing from
sectionOrder are appended after the listed ones in the default order — so
sectionOrder only reorders sections, it never hides them. Use each section's
isEnabled flag to hide a section.

Current product (Shopify only)

When currentProduct.isEnabled is true and the shopper is on a product page
(DG_CAMPAIGNS_VARS.currentProduct, populated automatically on standard
Shopify storefronts), the welcome screen shows a "You're viewing" card with
the product image, name, and optional vendor/price. When no current product
data is available the card is not rendered.

PropertyTypeDefaultDescription
isEnabledbooleanfalseShows the current product section.

Tapping the ask button starts the conversation with
lang.welcomeScreen.currentProduct.productMessage (with the {name}
placeholder replaced by the product title). The customer can also dismiss the
card; dismissal is local to the current welcome screen view.

All copy is translatable via lang.welcomeScreen.currentProduct (title,
buttonText, productMessage).

Where is my order? (WISMO)

When wismo.isEnabled is true the welcome screen shows an order tracking
card. The card adapts to which details the widget still needs from the
customer:

PropertyTypeDefaultDescription
isEnabledbooleanfalseShows the WISMO section.
formFieldsstring[]['orderNumber', 'email']The inputs shown on the tracking form. Any combination of 'name', 'orderNumber' and 'email', rendered in the order given. See Form fields.
orderNumberRegexPatternstringundefinedOptional regex (as a string) used to validate the entered order number. When omitted, any non-empty order number is accepted.

Form fields

The tracking form shows the inputs listed in formFields. The name and
email fields are only shown when the widget does not already know the value:
a name or email is considered known when it is available from a pre-chat form
field with metadata.systemField: 'name' / 'email', or when we detect the user is logged in to Shopify.

Submitting the form starts the conversation. When the orderNumber field is
displayed, the opening message is
lang.welcomeScreen.whereIsMyOrder.track.message with the {orderNumber}
placeholder replaced by the entered value, for example
Where is my order A-2847?. When it is not displayed, the opening message is
loggedIn.trackMessage. An entered name and email are passed into the
conversation init call (the same path used by the pre-chat form), so the
session is created with those details — they are not included in the user
message.

No fields to display

When every field in formFields is hidden — for example
formFields: ['name', 'email'] and both values are already known, or
formFields: [] — the card collapses to a one-tap "Track your orders" card
that starts the conversation with loggedIn.trackMessage.

Cart promotion (Shopify only)

When cartPromotion.isEnabled is true and the shopper has items in their
cart, the welcome screen shows a "Still in your bag" card summarising
the cart: product thumbnails, the number of items and the cart total. The card
works the same for guests and identified (logged in) users — Shopify carts
exist for both. When no cart data is available the card is not rendered.

The cartPromotion object is delivered via the server widget config:

PropertyTypeDescription
isEnabledbooleanShows the cart promotion card.
minimumCartTotalobjectShopify MoneyV2 shape for the "minimum purchase amount" prerequisite: { amount: string, currencyCode: string } (e.g. { amount: "200.0", currencyCode: "GBP" }). Amount is in major currency units — not pence/cents.
rewardTextstringReward label shown in the goal chip and progress/unlocked messages, e.g. Free shipping. Configured here (not in lang) because it is promotion-specific.

While the cart total is below minimumCartTotal the card shows a progress bar
and how much more the shopper needs to spend
(lang.welcomeScreen.cartPromotion.progressMessage). Once the threshold is
met the card celebrates the unlocked reward and shows a "Go to cart" button
that navigates the host page to cartUrl.

All surrounding copy is translatable via lang.welcomeScreen.cartPromotion
(title, itemCount, itemCountSingular, progressMessage,
unlockedTitle, unlockedSubtitle, goToCartButtonText).

Buy it again (Shopify only)

When buyItAgain.isEnabled is true and the identified Shopify customer has
a previous order (DG_CAMPAIGNS_VARS.customer.lastOrder.items), the welcome
screen shows a "Buy it again" card with those items. Guests and customers with
no last-order data do not see the card.

PropertyTypeDefaultDescription
isEnabledbooleanfalseShows the buy it again section.
  • One item — the card shows that product and a primary button that adds it
    to the cart.
  • Multiple items — the card lists each product with its own Add button,
    plus a primary button that adds every item (at its ordered variant and
    quantity) to the cart in one tap.

Adding items uses the same Shopify add-to-cart path as product carousels and
does not start a chat conversation.

All copy is translatable via lang.welcomeScreen.buyItAgain (title,
itemCount, itemCountSingular, rowButtonText, buttonText,
addedButtonText).

Popular questions

When popularQuestions.isEnabled is true and popularQuestions.questions
contains at least one question, the welcome screen shows a card listing the
configured questions. Tapping a question starts the conversation with that
question as the user's message, exactly as if they had typed it.

The questions themselves live in the widget config rather than lang: they
are defined by you, are not translated by the widget, and have no defaults.
If you serve multiple locales, provide the questions in the appropriate
language per widget (or via your own locale-switching logic when embedding).
Only the section heading is translatable, via
lang.welcomeScreen.popularQuestions.title.

Featured products

When featuredProducts.isEnabled is true and featuredProducts.products
contains at least one product, the welcome screen shows a horizontally
scrolling product carousel. Tapping a product starts the conversation with
lang.welcomeScreen.featuredProducts.productMessage (with the {name}
placeholder replaced by the product name), or opens the product page when
openProductPage is enabled.

PropertyTypeDefaultDescription
isEnabledbooleanfalseShows the featured products carousel.
productsproduct[][]The products to display. Configured here (not in lang) because they are customer-defined and not translated.
openProductPagebooleanfalseWhen true, tapping a product opens its url on the host page instead of sending a message to the conversation.

Each product in products has the following shape:

PropertyTypeRequiredDescription
namestringyesThe product name. Also interpolated into productMessage via the {name} placeholder.
imagestringyesAbsolute URL of the product thumbnail. Products missing a name or image are skipped.
pricestringnoPreformatted price display string, e.g. £399. The widget does not format or convert it. Hidden if omitted.
urlstringnoAbsolute URL of the product page (PDP). Only used when openProductPage is true.

When openProductPage is false (the default), tapping a product starts the
conversation with lang.welcomeScreen.featuredProducts.productMessage. When
it is true, tapping a product navigates the host page to the product's
url; products without a url do nothing when tapped.

The section heading and the product message are translatable via
lang.welcomeScreen.featuredProducts (title, productMessage).

Starting the conversation

The welcome screen defers session creation: no chat session exists while it is
shown, and no start event is sent when the user acts. A message produced by
the current product card, WISMO card, popular questions, featured products, or
typed into the welcome screen input creates the session and is delivered as the
opening message of the conversation, so your flow receives it directly. Cart
actions (cart promotion "Go to cart", buy it again add-to-cart) do not start a
conversation.

Customising the text

All welcome screen copy lives under lang.welcomeScreen and can be overridden
per locale: the greeting (title, titleLoggedIn, subtitle), current
product copy (currentProduct), WISMO copy (whereIsMyOrder), the cart card
copy (cartPromotion), buy it again copy (buyItAgain), the popular questions
heading (popularQuestions) and the featured products copy
(featuredProducts). See the
Language documentation for the
full key reference and default values.


Did this page help you?