SDK reference · Assistants and evaluation
client.alerts
client.alerts.{ get, enable, disable }With alerts on, a conversation's inbox is checked every few minutes without running the assistant. A decision model sorts new mail, and only mail that is time-sensitive or needed today wakes the assistant, which sends a one-line alert and explains it when the user replies. Alerts arrive as ordinary messages on your subscription.
They need the application's managed models, since each new message's sender, subject and preview go to the decision model, and a Gmail account the conversation can use.
get
get(conversationId: string): Promise<Resource>The conversation's alerts, with the last check's result and any error.
Returns Promise<Resource>
enable
enable(conversationId: string, input: EmailAlert, key: string): Promise<Resource>Turns alerts on or changes them. `criteria` says what matters most to the user, and `every_minutes` how often to check (default 5).
Parameters
keystring- An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.
Returns Promise<Resource>
disable
disable(conversationId: string, key: string): Promise<{ deleted: boolean }>Turns alerts off.
Parameters
keystring- An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.
Returns Promise<{ deleted: boolean }>