You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/get-started/messages-get-started-net.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,11 @@ The following classes and interfaces handle some of the major features of the Az
30
30
|`NotificationMessagesClient`| Connects to your Azure Communication Services resource. It sends the messages. |
31
31
|`MessageTemplate`| Defines which template you use and the content of the template properties for your message. |
32
32
|`TemplateNotificationContent`| Defines the "who" and the "what" of the template message you intend to send. |
33
-
|`TextNotificationContent`| Defines the "who" and the "what" of the text message you intend to send. |
34
-
|`MediaNotificationContent`| Defines the "who" and the "what" of the media message you intend to send. |
33
+
|`TextNotificationContent`| Defines the "who" and the "what" of the text message you intend to send. |
34
+
|`ImageNotificationContent`| Defines the "who" and the "what" of the image media message you intend to send. |
35
+
|`DocumentNotificationContent`| Defines the "who" and the "what" of the Document media message you intend to send. |
36
+
|`VideoNotificationContent`| Defines the "who" and the "what" of the Video media message you intend to send. |
37
+
|`AudioNotificationContent`| Defines the "who" and the "what" of the Audio media message you intend to send. ||
35
38
36
39
> [!NOTE]
37
40
> For more information, see the Azure SDK for .NET reference [Azure.Communication.Messages Namespace](/dotnet/api/azure.communication.messages).
@@ -57,7 +60,7 @@ Follow these steps to add required code snippets to the Main function of your `P
57
60
-[Send a video media message to a WhatsApp user](#send-a-video-media-message-to-a-whatsapp-user).
58
61
59
62
> [!IMPORTANT]
60
-
> To send a text message to a WhatsApp user, the WhatsApp user must first send a message to the WhatsApp Business Account. For more information, see [Start sending messages between business and WhatsApp user](#start-sending-messages-between-a-business-and-a-whatsapp-user).
63
+
> To send a text or media message to a WhatsApp user, the WhatsApp user must first send a message to the WhatsApp Business Account. For more information, see [Start sending messages between business and WhatsApp user](#start-sending-messages-between-a-business-and-a-whatsapp-user).
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/interactive/messages-quickstart-interactive-messages-net.md
+326-2Lines changed: 326 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,9 @@ title: Include file
3
3
description: Include file
4
4
services: azure-communication-services
5
5
author: shamkh
6
+
manager: camilo.ramirez
6
7
ms.service: azure-communication-services
8
+
ms.subservice: azure-communication-services
7
9
ms.subservice: advanced-messaging
8
10
ms.date: 12/15/2024
9
11
ms.topic: include
@@ -17,6 +19,328 @@ ms.author: shamkh
17
19
- Active WhatsApp phone number to receive messages.
18
20
- .NET development environment, such as [Visual Studio](https://visualstudio.microsoft.com/downloads/), [Visual Studio Code](https://code.visualstudio.com/Download), or [.NET CLI](https://dotnet.microsoft.com/download).
19
21
20
-
## Set up environment
22
+
## Set up the environment
23
+
24
+
[!INCLUDE [Setting up for .NET Application](../dot-net-application-setup.md)]
25
+
26
+
## Object model
27
+
28
+
The following classes and interfaces handle some of the major features of the Azure Communication Services Messages SDK for .NET.
29
+
30
+
| Class Name | Description |
31
+
| --- |--- |
32
+
|`NotificationMessagesClient`| Connects to your Azure Communication Services resource. It sends the messages. |
33
+
|`InteractiveNotificationContent`| Defines the interactive message business can send to user. |
[!INCLUDE [Common setting for using Advanced Messages SDK](../common-setting.md)]
55
+
56
+
## Code examples
57
+
58
+
The Messages SDK supports the following WhatsApp Interactive messages:
59
+
60
+
-[Send an Interactive List options message to a WhatsApp user](#send-an-interactive-list-options-message-to-a-whatsapp-user).
61
+
-[Send an Interactive Reply Button message to a WhatsApp user](#send-an-interactive-reply-button-message-to-a-whatsapp-user).
62
+
-[Send an Interactive Click-to-action URL-based message to a WhatsApp user](#send-an-interactive-click-to-action-url-based-message-to-a-whatsapp-user).
63
+
64
+
### Send an Interactive List options message to a WhatsApp user
65
+
66
+
The Messages SDK enables Contoso to send interactive WhatsApp messages when initiated by WhatsApp users. To send list messages:
-[Recipient Phone Number in E.164 format](#set-recipient-list).
69
+
- List Message can be created using the given properties:
70
+
71
+
| Action type | Description |
72
+
| --- | --- |
73
+
|`ActionGroupContent`| This class defines the title of the group content and array of the group. |
74
+
|`ActionGroup`| This class defines the title of the group and array of the group items. |
75
+
|`ActionGroupItem`| This class defines ID, Title, and description of the group Item. |
76
+
|`WhatsAppListActionBindings`| This class defines the `ActionGroupContent` binding with the interactive message. |
77
+
78
+
> [!IMPORTANT]
79
+
> To send an interactive message to a WhatsApp user, the WhatsApp user must first send a message to the WhatsApp Business Account. For more information, see [Start sending messages between business and WhatsApp user](#start-sending-messages-between-a-business-and-a-whatsapp-user).
80
+
81
+
In this example, the business sends an interactive shipping options message to the user:
82
+
83
+
```csharp
84
+
usingAzure.Communication.Messages;
85
+
usingAzure.Communication.Messages.Models;
86
+
87
+
publicasyncTaskSendWhatsAppListMessage()
88
+
{
89
+
varactionItemsList1=newList<ActionGroupItem>
90
+
{
91
+
newActionGroupItem("priority_express", "Priority Mail Express", "Next Day to 2 Days"),
0 commit comments