This article shares a possible use case your app or site could support, as well as a sample flow. This can be a helpful jumping-off point.
To check that a response has been sent to every message from the site visitor:
- Call List Messages.
- Create a copy of the messages returned in the response to include only messages sent by the site visitor. Call these "questions".
- For each "question", iterate over the messages returned in the response to check if one exists that's an
answerTo
the "questions".
- Call Bulk Create Messages to send "answers" to all the unanswered "questions".