# SendSmartMessage

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/Arena-Interactive-Oy/arena-frends-sendmessage-task>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                       | Description                                                                                                                                                             |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CustomerId : `Guid`        | <p>Your CustomerId</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                     |
| ServiceId : `Guid`         | <p>ServiceId for service to use to send the message</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                    |
| Sender : `String`          | <p>Sender address or name</p><p><br>Default: <code>-</code><br>Example: <code>+358101001234</code></p>                                                                  |
| Content : `String`         | <p>Message content. May contain variable placeholders like $(variable), which can be used by</p><p><br>Default: <code>-</code><br>Example: <code>Hello world</code></p> |
| Recipients : `Recipient[]` | <p>Message recipient phone numbers, preferably in E.164 format</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                         |
| {% endtab %}               |                                                                                                                                                                         |

{% tab title="Parameter: Options" %}

| Name                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🗝PersonalAccessToken : `String`                                  | <p>PAT (Personal Access Token) for sending messages</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                                          |
| DlrUrl : `String`                                                 | <p>Optional, URL for Delivery reports</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                                                        |
| CustomerData : `String`                                           | <p>Optional, data to attach to the message event, used in reporting.</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                         |
| SendDateTime : `Nullable<DateTime>`                               | <p>Optional, for scheduled messages</p><p><br>Default: <code>-</code><br>Example: <code>04/22/2025 10:45:23</code></p>                                                                                                                                                                                                                                                                                        |
| AllowedSendTimeStart : `String`                                   | <p>Optional, for limiting time of day (UTC) when messages are allowed to be sent (start of range)</p><p><br>Default: <code>-</code><br>Example: <code>08:00:00</code></p>                                                                                                                                                                                                                                     |
| AllowedSendTimeEnd : `String`                                     | <p>Optional, for limiting time of day (UTC) when messages are allowed to be sent (end of range)</p><p><br>Default: <code>-</code><br>Example: <code>16:00:00</code></p>                                                                                                                                                                                                                                       |
| AllowedSendDays : `DayOfWeek[]`                                   | <p>Optional, for limiting day(s) of week when messages are allowed to be sent</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                |
| RequestId : `String`                                              | <p>Optional, to detect duplicate requests. If not set, a value will be generated.</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                            |
| UnicodeCharacterHandlingPolicy : `UnicodeCharacterHandlingPolicy` | <p>Optional, for controlling Unicode character handling</p><p>Possible values:</p><ul><li><code>None</code>: Optional, for controlling Unicode character handling</li><li><code>Strict</code>: Optional, for controlling Unicode character handling</li><li><code>Replace</code>: Optional, for controlling Unicode character handling</li></ul><p><br>Default: <code>0</code><br>Example: <code>-</code></p> |
| ThrowErrorOnFailure : `Boolean`                                   | <p>Throw exception if return value of request is not successful.</p><p><br>Default: <code>true</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                          |
| ErrorMessageOnFailure : `String`                                  | <p>Error message in case of thrown exception or task failure</p><p><br>Default: <code>-</code><br>Example: <code>-</code></p>                                                                                                                                                                                                                                                                                 |
| {% endtab %}                                                      |                                                                                                                                                                                                                                                                                                                                                                                                               |

{% tab title="Result: Result" %}

| Name                                        | Description                                                     |
| ------------------------------------------- | --------------------------------------------------------------- |
| Success : `Boolean`                         | True if message was queued successfully                         |
| Id : `String`                               | Smart send ID                                                   |
| RecipientCount : `Nullable<Int32>`          | Total recipient count                                           |
| MessagePartCount : `Nullable<Int32>`        | Total message part count                                        |
| SendDateTimeEstimate : `Nullable<DateTime>` | Rough estimate for when message has been sent to all recipients |
| Warnings : `String[]`                       | Warnings related to recipient-specific customizations           |
| Error : `Error`                             | Error, in case sending was unsuccessful.                        |
| {% endtab %}                                |                                                                 |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2025-04-22

#### Changed

* Initial implementation (Smart Send Message, SMS protocol)

### \[1.1.0] - 2025-08-18

#### Changed

* Naming changes for solution, project and task to match guidelines

### \[1.2.0] - 2025-09-02

#### Changed

* Changed `Input` and `Output` definitions from `record` to `class`, updated unit test data to reflect this
  {% endtab %}
  {% endtabs %}
