Skip to content

Commit

Permalink
Merge pull request #31 from Cognigy/feature/whatsapp-quick-replies
Browse files Browse the repository at this point in the history
added quick reply support to tyntec webhook transformer
  • Loading branch information
alexteusz authored Dec 8, 2021
2 parents 5abae2a + 98d2cdc commit 19b8033
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 200 deletions.
62 changes: 1 addition & 61 deletions endpoint/webhook/tyntec-whatsapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,11 @@ This [Transformer Function](https://docs.cognigy.com/docs/transformers) converts

- [Tyntec - WhatsApp](#tyntec---whatsapp)
- [Provided Message Types](#provided-message-types)
- [Cognigy.AI Version 4](#cognigyai-version-4)
- [Text](#text)
- [Media Attachments](#media-attachments)
- [Gallery](#gallery)
- [Quick Reply](#quick-reply)
- [Location](#location)
- [Cognigy.AI Version 3](#cognigyai-version-3)
- [Text](#text-1)
- [Attachments](#attachments)
- [Gallery](#gallery-1)
- [Quick Reply](#quick-reply-1)
- [Location](#location-1)

## Cognigy.AI Version 4

### Text

Expand Down Expand Up @@ -72,55 +63,4 @@ Use the **Text** type of the SAY Node and define a data only message (No Text),

This will be displayed like this:

<img src="./docs/location.png" width="50%">


## Cognigy.AI Version 3

### Text

Use the **Default** tab of the SAY Node.

<img src="./docs/text.png" width="50%">

### Attachments

Use the **Webchat** tab of the SAY Node and define an **Attachment**.

<img src="./docs/image.png" width="50%">

### Gallery

Use the **Webchat** tab of the SAY Node and define a **Gallery**.

**IMPORTANT**:
You have to define an image for each gallery item!

<img src="./docs/gallery.png" width="50%">

### Quick Reply

Use the **Webchat** tab of the SAY Node and define a **Quick Reply**.

<img src="./docs/quickReplies.png" width="50%">

**Note**: WhatsApp will display the quick replies as text messages with a trailing number, such as `1. first quick reply`. The user can either type in the number or the text of the quick reply to send it back to the AI.

### Location

Use the **Default** tab of the SAY Node and define a data only message (No Text), where the data has to look like the following:

```json
{
"location": {
"longitude": -122.747986,
"latitude": 37.989981,
"name": "Your Location",
"address": "Shoreline Highway, CA 1, California"
}
}
```

This will be displayed like this:

<img src="./docs/location.png" width="50%">
<img src="./docs/location.png" width="50%">
Binary file modified endpoint/webhook/tyntec-whatsapp/docs/quickReplies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 19b8033

Please sign in to comment.