Ask with buttons on WhatsApp
whatsapp-send-buttonsnotifyexterne WirkungSends 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.
Auf einen Blick
| Eigenschaft | Wert |
|---|---|
| Schrittname | whatsapp-send-buttons |
| Ressource | ClusterStep (lumen.ai/v1alpha1) |
| Palettengruppe, Kategorie | notify, messages |
| Credits | 1 Credit bei jedem Erfolg |
| Externe Wirkung | ja Er ändert etwas außerhalb von Lumen, deshalb fragt ein Wiederholungsversuch vorher nach, und ein Test zeigt, was er tun würde, statt es zu tun. |
| Die Installation muss bereitstellen | nichts |
Eingaben
| Eigenschaft | Wert |
|---|---|
| Braucht | nichts |
| Liefert | fields |
| Arbeitet auf | item einem Dokument nach dem anderen |
Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe Dokumente und Daten.
Ausgaben
Ein späterer Knoten verweist auf eine Ausgabe als {nodeId.field} in einem Text oder als nodeId.field in einer Bedingung.
| Ausgabe | Typ |
|---|---|
whatsappMessageId | string |
whatsappStatus | string |
Einstellungen
Wird unter config: im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie {nodeId.field} enthalten.
| Einstellung | Typ | Standardwert | Beschreibung |
|---|---|---|---|
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 |
texterforderlich | string | - | MessageminLength 1; maxLength 1024 |
buttonserforderlich | list of object | - | ButtonsminItems 1; maxItems 3 |
buttons[].iderforderlich | string | - | ID is what comes back in the run the tap starts (its buttonId).minLength 1; maxLength 256 |
buttons[].titleerforderlich | string | - | ButtonminLength 1; maxLength 20 |
Das vollständige JSON Schema dieser Einstellungen: whatsapp-send-buttons.schema.json.
Beispiel
buttons:
- id: approve
title: לאשר
- id: reject
title: לדחות
text: להפיק קבלה על {amount}?
Im Flow verwenden
Ein Knoten, der whatsapp-send-buttons ausführt, steht unter spec.nodes eines Flow. Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.
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}?