Skip to content

Commit

Permalink
Update code sample
Browse files Browse the repository at this point in the history
  • Loading branch information
SketchingDev committed Sep 8, 2023
1 parent ca32f6b commit 2011f35
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/unordered-messages.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Handling unordered messages

The Web Messenger server can sometimes return responses out of order, as mentioned in the documentation:
The Web Messenger server can sometimes return responses out of order, as [mentioned in the documentation](https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi#messaging):
> All messaging follows a request/response pattern. However, web messaging is an asynchronous
> channel and therefore no guarantee to ordering is provided.
>
> Source: https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi#messaging
I suspect the official embeddable client deals with this by re-ordering the messages on the fly in the UI. However,
this approach is problematic for this tool, as it asserts on the order of messages being received:

```yaml
#...
scenarios:
"Accept Survey":
- waitForReplyContaining: Welcome to our company's chatbot # Expected to come first
"Convo starts with welcome message":
- waitForReplyContaining: Welcome to our company's chatbot
- waitForReplyContaining: How can I help you?
```
Expand Down

0 comments on commit 2011f35

Please sign in to comment.