-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design proposal: Starter Prompts #5422
Draft
compulim
wants to merge
6
commits into
main
Choose a base branch
from
doc-starter-prompt-proposal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
78d9e6b
Add payload
compulim 2ca8990
Clarify text format
compulim 43ee400
Update STARTER_PROMPTS.md
compulim 7a0ff56
Update STARTER_PROMPTS.md
compulim 20a2c6b
Update STARTER_PROMPTS.md
compulim ba4df3f
Update STARTER_PROMPTS.md
compulim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Starter Prompts | ||
|
||
Starter prompts are a special message that would send during greeting. It can consist of: | ||
|
||
- An optional image | ||
- An optional name of the bot (plain text) | ||
- An optional description about the bot (Markdown) | ||
- 1 to 6 buttons with predefined message to assist customers to jumpstart the conversation | ||
- A title for each button (plain text, required) | ||
- The message to send or put in the send box when clicked (plain text, required) | ||
- Notes: if the Starter prompts has no prompt buttons, service should not send Starter Prompts activity. Web Chat should ignore Starter Prompts activity without any buttons | ||
|
||
## UX design choices | ||
|
||
- Buttons will show as a 3x2 grid when width of Web Chat is >= 500px. If it is <= 499px, buttons will show as a 1x3 grid with "show more" | ||
- If there is a "Starter Prompts" activity being sent in the conversation, the "View prompts" button will always show on lower right, just above the send box | ||
- If suggested actions are shown, it will be show on top of the "View prompts" button | ||
- Clicking on the "View prompts" button will pop up a modal dialog to select multiple buttons | ||
|
||
## Payload | ||
|
||
```json | ||
{ | ||
"type": "event", | ||
"name": "StarterPrompts", // Should we name this "greeting" event? And should it be camelCase, PascalCase, kebab-case? | ||
"entities": [ | ||
{ | ||
"@context": "https://schema.org", | ||
"@id": "", | ||
"@type": "Message", | ||
"type": "https://schema.org/Message", | ||
|
||
"keywords": ["WelcomeMessage"], // What name should we put in? Pre-chat message, Starter Prompts, greeting, welcome? | ||
"sender": { | ||
"@type": "Person", | ||
"description": "I can help you with anything around you. Just let me know.", | ||
"image": "https://.../bot.svg", // Could be data URI of an image. | ||
"name": "Secretary Bot" | ||
}, | ||
"potentialActions": [ | ||
{ | ||
"@type": "SendAction", | ||
"name": "Check time", | ||
"object": { | ||
"@type": "Message", | ||
"text": "What time is it now?" | ||
} | ||
}, | ||
{ | ||
"@type": "SendAction", | ||
"name": "Check weather", | ||
"object": { | ||
"@type": "Message", | ||
"text": "Do I need to bring an umbrella?" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.