# Insider One

> Create and update users, record events and purchases, manage static segments, opt-outs and data deletion requests in Insider One's customer database, and read email campaign analytics.

App · 22 actions. Web page: https://docs.lodol.com/docs/integrations/insider

## Actions

### Add user to static segments

Add a user to one or more static segments by their IDs.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Segment IDs (`segment_ids`, list, required): Segment IDs, from each segment's page in Insider One.
- Don't start journeys (`skip_hook`, true/false): Turn on to keep this data from starting Architect journeys or data streams, such as when importing past activity.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Check segment membership

Find out whether a user is in each of up to 100 segments, static or dynamic.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Segment IDs (`segment_ids`, list, required): Segment IDs, from each segment's page in Insider One.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "identifiers": {},
    "insider_id": "example",
    "member_of": [
      1
    ],
    "not_member_of": [
      1
    ],
    "segment_ids": {}
  }
}
```

### Create or update user

Add a user to Insider One, or update the one with this identifier. Only the fields filled in change.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- First name (`name`, text): The user's first name.
- Last name (`surname`, text): The user's last name.
- Email (`email`, text): The user's email address, saved on the profile. Leave empty when the user is found by email.
- Phone number (`phone_number`, text): The user's phone number with + and the country code, such as +14155550123.
- Gender (`gender`, text): The user's gender.
- Birthday (`birthday`, date): The user's birthday.
- Age (`age`, number): The user's age. At least 0.
- Language (`language`, text): The user's language, such as en_US.
- Country (`country`, text): The user's country. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- City (`city`, text): The user's city.
- Email opt-in (`email_optin`, text): Whether the user allows marketing email. One of: `true` (Yes), `false` (No).
- SMS opt-in (`sms_optin`, text): Whether the user allows marketing SMS. One of: `true` (Yes), `false` (No).
- WhatsApp opt-in (`whatsapp_optin`, text): Whether the user allows marketing WhatsApp messages. One of: `true` (Yes), `false` (No).
- Data processing consent (`gdpr_optin`, text): Whether Insider One may process the user's data and reach them at all. No stops every campaign and message to them. One of: `true` (Yes), `false` (No).
- Custom attributes (`custom_attributes`, object): Custom attributes to set, by their name in Insider One, such as loyalty_tier. A new name creates the attribute.
- Don't start journeys (`skip_hook`, true/false): Turn on to keep this data from starting Architect journeys or data streams, such as when importing past activity.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Delete identifier

Remove an email address, phone number, user ID or custom identifier from a user. A user's only identifier can't be removed.

**Inputs**

- Identifier (`identifier_type`, text): Which identifier to change. Leave empty for email address. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `custom` (Custom identifier). Default: `email`.
- Value (`value`, text, required): The identifier's value.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "identifiers": {}
  }
}
```

### Delete user attributes

Remove attributes from a user's profile, such as for a right-to-erasure request. This can't be undone.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Attributes (`attributes`, list): Default attributes to remove. One or more of: `name` (First name), `surname` (Last name), `gender`, `age`, `birthday`, `language`, `country`, `city`, `email_optin` (Email opt-in), `sms_optin` (SMS opt-in), `whatsapp_optin` (WhatsApp opt-in), `gdpr_optin` (Data processing consent (GDPR opt-in)).
- Custom attributes (`custom_attributes`, list): Custom attributes to remove, by their name in Insider One.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Delete user profile

Delete a user's whole profile: attributes, events and identifiers. This can't be undone.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "found": true,
    "queued": true
  }
}
```

### Delete user's personal data

Remove a user's personal data, such as their name, email address and phone number, keeping the profile as an anonymous one. This can't be undone.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "anonymized": true
  }
}
```

### Get email campaign analytics

Get an email campaign's sends, opens, clicks, conversions, revenue and unsubscribes, in total and for each variant.

**Inputs**

- Campaign (`campaign_id`, number, required): The email campaign. At least 1.
- From (`start`, date and time, required): Count activity from this time, such as when the campaign was launched.
- To (`end`, date and time): The end of the period. Leave empty for now.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "data": {
      "details": {},
      "summary": {
        "blocks": 1,
        "bounce": 1,
        "bounceDrop": 1,
        "bounceRate": 1,
        "clickThroughRate": 1,
        "clickToOpenRate": 1,
        "conversionRate": 1,
        "conversions": 1,
        "delivered": 1,
        "deliveryRate": 1,
        "frequencyDrop": 1,
        "invalidDrop": 1,
        "linkClickActivity": [
          {
            "link": "example",
            "totalClick": 1,
            "uniqueClick": 1
          }
        ],
        "openRate": 1,
        "revenue": 1,
        "sendingDrops": 1,
        "sent": 1,
        "spamDrop": 1,
        "spamReports": 1,
        "systemDrops": 1,
        "totalClicks": 1,
        "totalOpens": 1,
        "uniqueClicks": 1,
        "uniqueMachineOpenRate": 1,
        "uniqueMachineOpens": 1,
        "uniqueOpens": 1,
        "uniqueUserOpenRate": 1,
        "uniqueUserOpens": 1,
        "unsubscribe": 1,
        "unsubscribeDrop": 1
      }
    }
  }
}
```

### Get overall email analytics

Get the totals across every email campaign in a period: sends, opens, clicks, conversions, revenue, top links, email clients and devices.

**Inputs**

- From (`start`, date and time, required): The start of the period.
- To (`end`, date and time): The end of the period. Leave empty for now.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "data": {
      "linkActivities": [
        {
          "link": "example",
          "totalClick": 1,
          "uniqueClick": 1
        }
      ],
      "summary": {
        "blocks": 1,
        "bounce": 1,
        "bounceDrop": 1,
        "bounceRate": 1,
        "clickThroughRate": 1,
        "clickToOpenRate": 1,
        "conversionRate": 1,
        "conversions": 1,
        "delivered": 1,
        "deliveryRate": 1,
        "frequencyDrop": 1,
        "invalidDrop": 1,
        "openRate": 1,
        "revenue": 1,
        "sendingDrops": 1,
        "sent": 1,
        "spamDrop": 1,
        "spamReports": 1,
        "systemDrops": 1,
        "totalClicks": 1,
        "totalOpens": 1,
        "uniqueClicks": 1,
        "uniqueMachineOpenRate": 1,
        "uniqueMachineOpens": 1,
        "uniqueOpens": 1,
        "uniqueUserOpenRate": 1,
        "uniqueUserOpens": 1,
        "unsubscribe": 1,
        "unsubscribeDrop": 1
      },
      "topEmailClients": {},
      "topEmailDevices": {}
    }
  }
}
```

### Get user events

Read a user's events of the kinds you name in a period, such as their purchases or email clicks.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Events (`event_names`, list, required): The events to read, such as purchase, email_click or a custom event's name.
- Parameters (`params`, list): Event parameters to return with each event, such as product_id or campaign_id. The time of each event always comes back.
- From (`start`, date and time, required): The start of the period.
- To (`end`, date and time): The end of the period. Leave empty for now.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "events": {},
    "quota": {
      "cost": 1,
      "total": 1,
      "used": 1
    }
  }
}
```

### Get user profile

Read a user's attributes, such as their name, opt-ins and custom attributes.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Attributes (`attributes`, list): The attributes to read. Leave empty for the user's identifiers, name, opt-ins and profile dates. One or more of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `iid` (Profile ID), `name` (First name), `surname` (Last name), `gender`, `age`, `birthday`, `language`, and 12 more.
- Custom attributes (`custom_attributes`, list): Custom attributes to read, by their name in Insider One, such as loyalty_tier.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "attributes": {},
    "events": {},
    "quota": {
      "cost": 1,
      "total": 1,
      "used": 1
    }
  }
}
```

### List email campaigns

List the email campaigns that have been sent or are sending, newest first. Journey emails aren't included.

**Inputs**

- Page (`page`, number): The page to read. Leave empty for the first. At least 1.
- Campaigns per page (`per_page`, number): Campaigns per page, up to 100. Leave empty for 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "currentPage": 1,
    "data": [
      {
        "id": 1,
        "name": "example",
        "senderDomain": "example",
        "startTime": "example",
        "subject": "example",
        "tags": "example",
        "type": "example",
        "utmParameters": {}
      }
    ],
    "lastPage": 1,
    "perPage": 1,
    "total": 1
  }
}
```

### Record event

Record an event on a user's profile, such as account_created or a custom event, to use in segments and journeys.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Event name (`event_name`, text, required): The event's name in lowercase with underscores, such as account_created. A new name creates a custom event.
- Happened at (`timestamp`, date and time): When the event happened. Leave empty for now.
- Product ID (`product_id`, text): The product's ID, for a product event.
- Product name (`name`, text): The product's name, for a product event.
- Categories (`taxonomy`, list): The product's category path, from the top, such as Electronics then Phones.
- Product URL (`url`, text): The product's page.
- Currency (`currency`, text): The currency the price is in. One of: `AED` (UAE dirham (AED)), `AFN` (Afghan afghani (AFN)), `ALL` (Albanian lek (ALL)), `AMD` (Armenian dram (AMD)), `AOA` (Angolan kwanza (AOA)), `ARS` (Argentine peso (ARS)), `AUD` (Australian dollar (AUD)), `AWG` (Aruban florin (AWG)), `AZN` (Azerbaijani manat (AZN)), `BAM` (Bosnia and Herzegovina convertible mark (BAM)), and 143 more.
- Quantity (`quantity`, number): How many of the product. At least 0.
- Unit price (`unit_price`, number): The product's price before discounts.
- Unit sale price (`unit_sale_price`, number): The product's price after discounts.
- Event group ID (`event_group_id`, text): Groups events of the same kind, such as the lines of one order.
- Custom parameters (`custom_params`, object): Custom event parameters, by name, such as customer_type.
- Don't start journeys (`skip_hook`, true/false): Turn on to keep this data from starting Architect journeys or data streams, such as when importing past activity.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Record purchase

Record a purchased product on a user's profile, such as an offline or in-store sale. Send one step per product in the order.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Order ID (`order_id`, text, required): The order's ID. Use the same one for every product in the order.
- Product ID (`product_id`, text, required): The product's ID.
- Product name (`product_name`, text, required): The product's name.
- Unit price (`unit_price`, number, required): The product's price before discounts. At least 0.
- Unit sale price (`unit_sale_price`, number, required): The product's price after discounts, what the user paid for one. At least 0.
- Quantity (`quantity`, number, required): How many the user bought. At least 1.
- Currency (`currency`, text, required): The currency the prices are in. One of: `AED` (UAE dirham (AED)), `AFN` (Afghan afghani (AFN)), `ALL` (Albanian lek (ALL)), `AMD` (Armenian dram (AMD)), `AOA` (Angolan kwanza (AOA)), `ARS` (Argentine peso (ARS)), `AUD` (Australian dollar (AUD)), `AWG` (Aruban florin (AWG)), `AZN` (Azerbaijani manat (AZN)), `BAM` (Bosnia and Herzegovina convertible mark (BAM)), and 143 more.
- Purchased at (`purchased_at`, date and time): When the purchase happened. Leave empty for now.
- Categories (`taxonomy`, list): The product's category path, from the top, such as Electronics then Phones.
- Product URL (`url`, text): The product's page.
- Don't start journeys (`skip_hook`, true/false): Turn on to keep this data from starting Architect journeys or data streams, such as when importing past activity.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Remove user from static segments

Take a user out of one or more static segments by their IDs.

**Inputs**

- Find user by (`identify_by`, text): How the user is found. Leave empty for email address. A custom identifier must be turned on in Insider One's Identity Resolution Management settings. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `insider_id` (Insider profile ID), `custom` (Custom identifier). Default: `email`.
- User (`identifier`, text, required): The user's email address, phone number with country code (such as +14155550123), user ID, Insider profile ID or custom identifier value, matching Find user by.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.
- Segment IDs (`segment_ids`, list, required): Segment IDs, from each segment's page in Insider One.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "fail": {
      "count": 1,
      "errors": {}
    },
    "successful": {
      "count": 1
    }
  }
}
```

### Resubscribe email addresses

Let marketing email reach these addresses again, everywhere or for one unsubscribe group.

**Inputs**

- Email addresses (`emails`, list, required): Email addresses, up to 500.
- Unsubscribe group ID (`group_id`, number): Resubscribe only to this unsubscribe group, by its ID. Leave empty to resubscribe to all marketing email. At least 1.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Resubscribe phone numbers to SMS

Let marketing SMS reach these phone numbers again.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with + and the country code, such as +14155550123, up to 500.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Resubscribe phone numbers to WhatsApp

Let marketing WhatsApp messages reach these phone numbers again.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with + and the country code, such as +14155550123, up to 500.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Unsubscribe email addresses

Stop marketing email to these addresses, everywhere or for one unsubscribe group.

**Inputs**

- Email addresses (`emails`, list, required): Email addresses, up to 500.
- Unsubscribe group (`group_name`, text): Unsubscribe only from this group. A name that doesn't exist yet creates the group. Leave empty to unsubscribe from all marketing email.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Unsubscribe phone numbers from SMS

Stop marketing SMS to these phone numbers.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with + and the country code, such as +14155550123, up to 500.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Unsubscribe phone numbers from WhatsApp

Stop marketing WhatsApp messages to these phone numbers.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with + and the country code, such as +14155550123, up to 500.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "statusMessage": "example"
  }
}
```

### Update identifier

Change a user's email address, phone number, user ID or custom identifier, keeping their history.

**Inputs**

- Identifier (`identifier_type`, text): Which identifier to change. Leave empty for email address. One of: `email` (Email address), `phone_number` (Phone number), `uuid` (User ID (UUID)), `custom` (Custom identifier). Default: `email`.
- Current value (`current_value`, text, required): The value the user has now.
- New value (`new_value`, text, required): The value to change it to. No other user may have it.
- Custom identifier name (`custom_identifier`, text): The custom identifier's name, such as user_loyalty_id. Only used when Find user by is Custom identifier.

**Outputs**

- `data` (object): The response from Insider One.

**Example output**

```json
{
  "data": {
    "new_identifier": {},
    "old_identifier": {}
  }
}
```
