Ask with buttons on WhatsApp
whatsapp-send-buttonsnotifyefectos externosSends a question with up to three buttons. The person's tap starts your flow again with their answer. Works within 24 hours of their last message.
De un vistazo
| Propiedad | Valor |
|---|---|
| Nombre del paso | whatsapp-send-buttons |
| Recurso | ClusterStep (lumen.ai/v1alpha1) |
| Grupo de la paleta, categoría | notify, messages |
| Créditos | 1 crédito cada vez que tiene éxito |
| Efectos externos | sí Cambia algo fuera de Lumen, así que un reintento pregunta antes y una prueba muestra lo que haría en lugar de hacerlo. |
| La instalación debe aportar | nada |
Entradas
| Propiedad | Valor |
|---|---|
| Necesita | nada |
| Produce | fields |
| Trabaja sobre | item un documento cada vez |
Necesita y Produce son tipos de datos (file, text, fields, email). El editor ofrece un paso solo donde lo que necesita ya está en el camino. Consulta Documentos y datos.
Salidas
Un nodo posterior se refiere a una salida como {nodeId.field} en un texto, o nodeId.field en una condición.
| Salida | Tipo |
|---|---|
whatsappMessageId | string |
whatsappStatus | string |
Ajustes
Se definen bajo config: en el nodo del flujo. Los ajustes de texto pueden contener marcadores de posición como {nodeId.field}.
| Ajuste | Tipo | Valor por defecto | Descripción |
|---|---|---|---|
connectorRef | string | - | Send fromminLength 1 |
to | string | - | TomaxLength 200 |
toMember | string | - | Their email. They must have joined this number with their phone (Profile, WhatsApp).maxLength 320 |
textobligatorio | string | - | MessageminLength 1; maxLength 1024 |
buttonsobligatorio | list of object | - | ButtonsminItems 1; maxItems 3 |
buttons[].idobligatorio | string | - | ID is what comes back in the run the tap starts (its buttonId).minLength 1; maxLength 256 |
buttons[].titleobligatorio | string | - | ButtonminLength 1; maxLength 20 |
El JSON Schema completo de estos ajustes: whatsapp-send-buttons.schema.json.
Ejemplo
buttons:
- id: approve
title: לאשר
- id: reject
title: לדחות
text: להפיק קבלה על {amount}?
Úsalo en un flujo
Un nodo que ejecuta whatsapp-send-buttons va bajo spec.nodes de un Flow. Dale cualquier id y enumera en next los ids de los nodos siguientes.
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
name: my-whatsapp-cloud
namespace: tenant-acme
spec:
classRef: {name: whatsapp-cloud}
config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: whatsapp-send-buttons-example
namespace: tenant-acme
spec:
displayName: "Ask with buttons on WhatsApp"
triggers:
- id: start
ref: {name: whatsapp-message-received}
connectorRef: {name: my-whatsapp-cloud}
next: [whatsapp-send-buttons]
nodes:
- id: whatsapp-send-buttons
stepRef: {name: whatsapp-send-buttons}
config:
buttons:
- id: approve
title: לאשר
- id: reject
title: לדחות
text: להפיק קבלה על {amount}?