Amarula.Content.Options (amarula v0.4.3)
View SourceAn incoming interactive message that presents a set of choices — a list
menu, a buttons message, a template-button message, or a native-flow
interactive message. These are what WhatsApp Business / call-center / automated
flows send to ask "pick one of these". A normal linked-device client can't send
them, but it receives them; the user's reply comes back as an
%Amarula.Content.Response{}.
The four proto shapes are unified into one:
:kind—:list | :buttons | :template | :interactive.:title— header/title text, if any.:body— the main prompt text.:footer— footer text, if any.:button_text— the label that opens the option list (list messages only).:options— the choices, each%{id, text, description}(descriptionisnilfor kinds that don't carry one).idis what your app keys the user's selection off; it matches theidof the later%Amarula.Content.Response{}.
For anything beyond the choices (media headers, native-flow param JSON, …), read
msg.raw.
Summary
Functions
Normalize one of the four interactive-presentation protos into a
%Amarula.Content.Options{}. kind says which proto m is.
Types
@type kind() :: :list | :buttons | :template | :interactive