Cartesiandocs

Customize

Suggestions

Starter questions on the welcome screen and follow-up chips after each answer.

There are two kinds of suggestion:

  • Starters appear on the empty welcome screen. They are centred, wrap over several lines, and are written by you or come from the vertical's defaults.
  • Follow-ups appear after each finished answer. Your backend writes them for that specific answer (POST /threads/{id}/suggest). They are a single horizontal row of chips that can be swiped.

Placement

By default, follow-ups sit on the composer, just above the input. This keeps the conversation clean and puts the next question within reach.

PlacementBehaviour
SuggestionPlacement.AboveComposer (default)One row of chips attached to the input. It slides in when an answer finishes and hides while an answer streams or while the shopper is typing. It is replaced after every answer.
SuggestionPlacement.InlineUp to three chips under the latest answer, inside the conversation.
9:41

FreshMart

Delivering to Home · 94107 · in 45 min

🥛Dairy
🥦Produce
🍞Bakery
🥩Meat
🍿Snacks

Lucerne Farms Eggs Large

$1.29

Wilcox Family Farm Organic Brown Eggs

$1.29

O Organics Sharp Cheddar Sliced

$2.99

Horizon Organic String Cheese

$5.99

FreshMart Assistant

Eggs and cheese for breakfast, add the cheapest eggs

SM
Searched eggs
Searched cheese
Viewed4 products

Here's a quick breakfast basket. The cheapest eggs are Lucerne Farms Large at $1.29, so I added a carton to your cart.

For cheese, the O Organics sharp cheddar slices are $2.99. If the kids want something to grab, Horizon string cheese is $5.99 for six.

4 results

Lucerne Farms Eggs Large

6 Count · Eggs

$1.29

$0.22/ct

Usual

Wilcox Family Farm Organic Brown Eggs

12 Count · Eggs

$1.29

$0.11/ct

O Organics Sharp Cheddar Sliced

6 Oz · Cheese

$2.99

$0.50/oz

Horizon Organic String Cheese

6 Count · Cheese

$5.99

$1.00/ct

Added 1 item to your cart

FreshMart Assistant can make mistakes. Please check prices and ingredients before you buy.

Powered byCogitX Cartesian
AboveComposer (default)
9:41

FreshMart

Delivering to Home · 94107 · in 45 min

🥛Dairy
🥦Produce
🍞Bakery
🥩Meat
🍿Snacks

Lucerne Farms Eggs Large

$1.29

Wilcox Family Farm Organic Brown Eggs

$1.29

O Organics Sharp Cheddar Sliced

$2.99

Horizon Organic String Cheese

$5.99

FreshMart Assistant

Eggs and cheese for breakfast, add the cheapest eggs

SM
Searched eggs
Searched cheese
Viewed4 products

Here's a quick breakfast basket. The cheapest eggs are Lucerne Farms Large at $1.29, so I added a carton to your cart.

For cheese, the O Organics sharp cheddar slices are $2.99. If the kids want something to grab, Horizon string cheese is $5.99 for six.

4 results

Lucerne Farms Eggs Large

6 Count · Eggs

$1.29

$0.22/ct

Usual

Wilcox Family Farm Organic Brown Eggs

12 Count · Eggs

$1.29

$0.11/ct

O Organics Sharp Cheddar Sliced

6 Oz · Cheese

$2.99

$0.50/oz

Horizon Organic String Cheese

6 Count · Cheese

$5.99

$1.00/ct

Added 1 item to your cart

FreshMart Assistant can make mistakes. Please check prices and ingredients before you buy.

Powered byCogitX Cartesian
Inline
CartesianFeatures.Builder()
    .suggestionPlacement(SuggestionPlacement.Inline)
    .build()

Your own starters

CartesianOptions.Builder()
    .starters(listOf("What's on sale this week?", "Gluten-free snacks for kids"))
    .build()

Turning them off

.suggestions(SuggestionMode.Starters)  // welcome questions only, no follow-ups
.suggestions(SuggestionMode.Off)       // neither

Your own chip design

Replace the chips while keeping the behaviour:

CartesianSlots.Builder()
    .suggestions { suggestions, controller ->
        LazyRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
            items(suggestions) { s ->
                MyChip(s, enabled = controller.canSend) { controller.send(s) }
            }
        }
    }
    .build()