# Survicate Cloud Mode (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 **Survicate Cloud Mode (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This destination is **Beta.**

[Survicate](https://survicate.com/integrations/segment-survey/?utm_source=segment\&utm_medium=referral) is a customer feedback platform that helps businesses collect, analyze, and act on customer insights across every channel.

Survicate maintains this destination. For any issues with the destination, [contact the Survicate Support team](mailto:support@survicate.com).

## Getting started

1. Open the [Survicate Connect tab for the Segment (Cloud Mode, Actions) integration](https://panel.survicate.com/o/0/w/0/integrations/segment_server_side?tab=connect) and copy your destination key.
2. Open the Segment app and click **Destinations**.
3. Search for "Survicate Cloud Mode (Actions)" in the Catalog, select it, and choose which of your sources to connect the destination to.
4. Enter the destination key into your Survicate Cloud Mode (Actions) destination settings page.

## Data normalization

Survicate performs the following data normalization on Segment events:

* Translates all `camelCase` attribute keys to `snake_case`.
* Flattens all object attributes to attributes prefixed by object key.
* Omits all array attributes.

## Destination Settings

| Field           | Description                                                                                                                | Required | Type     |
| --------------- | -------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Destination Key | Your Survicate Destination Key, which you can find in Survicate - Integrations - Segment (Cloud Mode, Actions) - Settings. | Yes      | password |

## Available Presets

Survicate Cloud Mode (Actions) has the following presets

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

## Available Actions

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

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

* [Identify Group](#identify-group)
* [Identify User](#identify-user-7)
* [Track Event](#track-event-10)

### Identify Group

Send group traits to Survicate

Identify Group is a **Cloud** action. The default Trigger is `type = "group"`

| Field        | Description                                     | Required | Type   |
| ------------ | ----------------------------------------------- | -------- | ------ |
| User ID      | The user's id                                   | No       | STRING |
| Anonymous ID | An anonymous id                                 | No       | STRING |
| Group ID     | The group id                                    | Yes      | STRING |
| Group traits | The Segment traits to be forwarded to Survicate | Yes      | OBJECT |
| Timestamp    | The timestamp of the event.                     | Yes      | STRING |

### Identify User

Send user traits to Survicate

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

| Field        | Description                                     | Required | Type   |
| ------------ | ----------------------------------------------- | -------- | ------ |
| User ID      | The user's id                                   | No       | STRING |
| Anonymous ID | An anonymous id                                 | No       | STRING |
| Traits       | The Segment traits to be forwarded to Survicate | Yes      | OBJECT |
| Timestamp    | The timestamp of the event.                     | Yes      | STRING |

### Track Event

Send events to Survicate

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

| Field        | Description                                   | Required | Type   |
| ------------ | --------------------------------------------- | -------- | ------ |
| User ID      | The user's id                                 | No       | STRING |
| Anonymous ID | An anonymous user id                          | No       | STRING |
| Event Name   | The event name                                | Yes      | STRING |
| Properties   | Object containing the properties of the event | No       | OBJECT |
| Timestamp    | The timestamp of the event.                   | Yes      | STRING |

## Identify

If you're not familiar with the Segment Spec, read more about the [Identify method](/docs/segment/connections/spec/identify).

An example Identify call takes the following format:

```js
analytics.identify('userId123', {
  email: 'nur@example.com',
  jobTitle: 'CEO',
  companySize: '50'
});

```

When you call Identify, Survicate receives Segment traits as respondent attributes. Use these actions in Survicate to trigger web and mobile surveys or filter survey results.

All traits passed in Identify calls are available in Survicate after you view a respondent profile or export survey data.

## Group

If you're not familiar with the Segment Spec, read more about the [Group method](/docs/segment/connections/spec/group).

Here's an example Group call:

```js
analytics.group('group123', {
    name: 'Company Inc.',
    address: {
        street: '6th St',
        city: 'San Francisco',
        state: 'CA',
        postalCode: '94103',
        country: 'USA'
    },
    categories: ['startup','SaaS']
});

```

The preceding call creates the following traits in Survicate:

| Key                          | Value         |
| ---------------------------- | ------------- |
| group\_id                    | group123      |
| group\_name                  | Company Inc.  |
| group\_address\_street       | 6th St        |
| group\_address\_city         | San Francisco |
| group\_address\_state        | CA            |
| group\_address\_postal\_code | 94103         |
| group\_address\_country      | US            |

Survicate omits the `categories` attribute, as it's an array.

## Track

If you're not familiar with the Segment Spec, read more about the [Track method](/docs/segment/connections/spec/track).

Here's an example of a Track call:

```js
analytics.track('plan_purchased', {
    plan: 'Pro Annual',
    accountType : 'Facebook'
});

```

Track calls trigger a Survicate call that sends the event name and properties to Survicate.

To trigger a survey on a Segment event, set that condition in Survicate. Open the survey's **Target > Audience** and add the event to the active audience targeting conditions.

When the Segment event fires and you've met any preset targeting conditions, Survicate shows your survey.

Event properties are optional for Track events.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Survicate Cloud Mode (Actions)  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

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

| Field           | Description                                                                                                                | Required | Type     |
| --------------- | -------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Destination Key | Your Survicate Destination Key, which you can find in Survicate - Integrations - Segment (Cloud Mode, Actions) - Settings. | Yes      | password |
