# 1Flow Web (Actions) Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **1Flow Web (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This destination is not compatible with [Destination Insert Functions.](/docs/segment/connections/functions/insert-functions/)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.
* This destination is **Beta.**

[1Flow](https://1flow.ai/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is a leading in-app user survey and messaging platform for Mobile app and SaaS businesses.

1Flow is an easy-to-use, yet powerful in-app survey and messaging software. Using 1Flow, you can reach users in-the-moment while they are interacting with your website or mobile app, to collect highly contextual user insights that help you improve your product offering and customer experience.

When you use the 1Flow Web (Actions) Destination, Segment loads the [1Flow SDK](https://1flow.ai/docs/install-sdk/javascript) for you. The 1Flow library enables you to track and identify user events on your website and interact with the 1Flow messenger window.

## Getting started

1. From Segment, navigate to  **Connections > Catalog**, then select **Destinations**.
2. Search for and select **1Flow Web (Actions) Destination**.
3. Select the web source that will send data to 1Flow web (Actions) and follow the steps to name your destination. The web source chosen must use [Analytics.js 2.0](/docs/segment/connections/source/catalog/libraries/website/javascript).
4. On the **Settings** tab, input your 1Flow **PROJECT API KEY** and other destinations settings.
5. Follow the step in the Destinations Actions docs to [customize your mappings](/docs/segment/connections/destinations/action/#customize-mappings).
6. Enable the destination and configured mappings.

## Destination Settings

| Field           | Description                                                                                                                               | Required | Type     |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Project API Key | This is the unique app\_id for your 1Flow application, serving as the identifier for data storage and retrieval. This field is mandatory. | Yes      | password |

## Available Presets

1Flow Web (Actions) has the following presets

| Preset Name   | Trigger                 | Default Action |
| ------------- | ----------------------- | -------------- |
| Identify User | Event type = "identify" | Identify User  |
| Track Event   | Event type = "track"    | Track Event    |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following 1Flow Web-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Identify User](#identify-user-22)
* [Track Event](#track-event-36)

### Identify User

Create or update a user in 1Flow.

Identify User is a **Web** action. The default Trigger is `type = "identify"`

| Field             | Description                       | Required | Type   |
| ----------------- | --------------------------------- | -------- | ------ |
| User ID           | A unique identifier for the user. | No       | STRING |
| Custom Attributes | The user's custom attributes.     | No       | OBJECT |

### Track Event

Submit an event to 1Flow.

Track Event is a **Web** action. The default Trigger is `type = "track"`

| Field            | Description                           | Required | Type   |
| ---------------- | ------------------------------------- | -------- | ------ |
| Event Name       | The name of the event.                | Yes      | STRING |
| User ID          | A unique identifier for the user.     | No       | STRING |
| Anonymous ID     | An anonymous identifier for the user. | No       | STRING |
| Event Properties | Information associated with the event | No       | OBJECT |

## Supported methods

### Identify

The 1Flow destination will automatically ingest a User ID and any values sent over your Identify spec as [traits](https://docs.1flow.ai/install-sdk/javascript#de21ec0a453d443b88ca4bc1b12dc6bf), as long as session capture is enabled in 1Flow.

When you call Segment's Identify method, it will be equivalent to `logUser` of 1Flow. Identify calls that do not have a User ID value are not sent to 1Flow.

* Segment's `userId` is `userID` in 1Flow
* Segment's `traits` is `userDetails` in 1Flow

### Track

The 1Flow destination automatically ingests any user actions tracked over your Track spec as [events](https://docs.1flow.ai/install-sdk/javascript#d19201d97efa4ea4b81be6a351709332), as long as session capture is enabled in 1Flow.

## Troubleshooting

### Requests to 1Flow return a 404 response

If you are seeing 404 responses in your browser's network tab, you've likely encountered one of two issues:

* You set the wrong App ID on the 1Flow Actions (Web) destination settings page.
* You set the wrong Regional Data Hosting value on the 1Flow Actions (Web) destination settings page. 1Flow gates regional endpoints by plan level, so you may not have access to EU data hosting.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field           | Description                                                                                                                               | Required | Type     |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Project API Key | This is the unique app\_id for your 1Flow application, serving as the identifier for data storage and retrieval. This field is mandatory. | Yes      | password |
