Receive
Record a provider event identifier, thread and sender. Confirm authenticity using the provider’s current documented mechanism. Store enough state to recognize a retry without logging unnecessary message content.
Decide
Check the user’s request, the agent’s allowed actions and whether a human already owns the thread. A late event should not restart a task that a teammate has completed.
Send
Keep the application action and provider message identifier connected. Handle a deferred or failed send explicitly. Ask the provider how to distinguish acceptance from delivery and read status.
Recover
Exercise a repeated event, a delayed callback and a disconnected recipient in a supported test environment. These are proposed cases for your implementation; this publication has not executed them against the providers.