> For the complete documentation index, see [llms.txt](https://help.smartico.ai/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.smartico.ai/welcome/products/crm-automation/activities-of-flows/activity-custom-im.md).

# Activity: Custom IM

If you are using a communication channel such as **in-platform Popups** or **Notification Centers**, Smartico offers a **Custom IM** solution. Smartico can act as a resource manager for such channels, triggering delivery from Journeys, Scheduled Campaigns, or REST API calls. As a final delivery step, Smartico will call your API to send the message.

👉 <mark style="color:orange;">Read more about Custom IM implementation</mark><mark style="color:purple;">:</mark>[ **here**](/welcome/technical-guides/communication-gateways/secured-messaging-gateways-email-sms-im.md#custom-im-via-the-customer-supplied-api)

<div data-with-frame="true"><figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-362fe9c5b0363c26fc96a98c19c61bcc2084e7a8%2FScreenshot_123.png?alt=media" alt=""><figcaption></figcaption></figure></div>

In the Custom IM activity operators can configure the following options:

1. **Provider** - choose the provider that will be used to send the communication. Operators can also choose the Automatic Selection (multi-brand setup).
   1. Automatic Selection (multi-brand setup) - used to automatically select the Custom IM gateway whose conditions best match the user; if no gateway with conditions matches, the gateway that has no conditions (the default one) is used. By default the first condition is Brand, but you can add more user properties to the gateway. This gives you more flexibility when you want to filter a specific segment of users to use different Gateway, for example.
2. **Allowed Communication hours** - used to define how the flow should behave if the time of the sending is in the ‘Do not Disturb’ period of the user.
3. **Custom IM message** - used to add the asset that will be sent to players, where you can define the message content. Before sending any communication, the corresponding asset must be created. You can also add multiple message variations for A/B testing, allowing you to test different versions and optimize engagement. When adding a second variation, you can specify the percentage of the audience that will receive each version, ensuring controlled message distribution.

### Campaign Flow Outbound Connectors

When added to a Journey flow, the Custom IM activity provides seven outbound connectors to branch user paths based on delivery status and player engagement:

* **Then**: Immediately moves the user to the next step once the dispatch request has been issued.
* **Sent**: Triggers when your API gateway successfully accepts the send request.
* **Delivered**: Triggers when your delivery system confirms the message reached the player via delivery status callback.
* **Impression**: Triggers when your system reports that the message was displayed or opened in the player's notification center or interface.
* **Any click**: Triggers when the player clicks any tracked link or action within the message.
* **Click link contains...**: Triggers only when the player clicks a link whose destination URL contains the specified text.
* **Failed**: Triggers if delivery fails due to an API error, invalid response, timeout, or account status restriction, allowing you to branch to fallback communication channels.

<div data-with-frame="true"><figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2FGFZHwRxb4fIkak1S6u3O%2Fc80514a5ba-crop-2-0635297c-2f18a1.png?alt=media" alt=""><figcaption></figcaption></figure></div>

### Dynamic Personalization

Custom IM messages support Smartico's dynamic tag replacement placeholders across both the main message body and custom extension fields:

* **Player Attributes**: Insert player profile attributes and registration details.
* **Player State Properties**: Use numeric or text state properties such as points balance or loyalty level.
* **Event Parameters**: In real-time campaigns triggered by events, reference event parameters like transaction amounts or game names.

Tags placed inside custom extension fields (such as titles, descriptions, button labels, and custom payload fields) are resolved dynamically before the request is dispatched to your endpoint.

### Related Activities

* [Activity: Best Channel](https://help.smartico.ai/welcome/products/crm-automation/activities-of-flows/activity-best-channel) — Learn how to include Custom IM as an evaluated channel in automated multi-channel routing.

### FAQ

**What happens if our API returns an error or fails to respond?**

If your API returns an error status code, returns an error response, or fails to return a valid external message ID, Smartico records the activity as failed. In Journey flows, the player is routed through the **Failed** connector branch to allow fallback actions.

**How does Smartico track delivered, opened, and clicked statuses?**

Smartico includes a unique callback URL in every outbound request. Your delivery system must send an HTTP GET request to this callback URL with the external message ID and the updated status (`delivered`, `opened`, or `clicked`) to update reporting and trigger downstream journey branches.

**Does Custom IM enforce frequency caps or opt-out settings?**

By default, Custom IM bypasses standard SMS and email marketing opt-out checks and frequency caps. Delivery timing is controlled by the **Allowed Communication hours** setting, which defaults to "Send always" but can be restricted to specific user time windows.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.smartico.ai/welcome/products/crm-automation/activities-of-flows/activity-custom-im.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
