# RD Station

> Manage RD Station Marketing contacts, tags, segment contacts, webhooks and performance reports.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/rd-station

## Actions

### Add leads to a workflow

Add leads to a workflow.

**Inputs**

- Workflow ID (`automation_id`, text, required): Identificador exclusivo do fluxo de automação
- Leads (`leads`, list, required): E-mail ou phone do lead

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "leads_added": [],
    "leads_not_found": []
  }
}
```

### Add tags to a contact

Add tags to a contact.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.
- Tags (`tags`, list, required): Tags para o contato

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "bio": "example",
    "city": "example",
    "country": "example",
    "email": "example",
    "extra_emails": [],
    "job_title": "example",
    "legal_bases": [],
    "linkedin": "example",
    "links": [],
    "name": "example",
    "personal_phone": "example",
    "phone": "example",
    "state": "example",
    "tags": [],
    "uuid": "example",
    "website": "example"
  }
}
```

### Create a contact

Create a contact.

**Inputs**

- Name (`name`, text): Nome do contato
- Email (`email`, text, required): Email do contato **(Obrigatório se o phone não for enviado)**
- Job title (`job_title`, text): Cargo do contato
- Website (`website`, text): Site do contato
- Personal phone (`personal_phone`, text): Telefone do contato
- Mobile phone (`mobile_phone`, text): Telefone do contato
- City (`city`, text): Cidade do contato
- State (`state`, text): Estado do contato
- Country (`country`, text): País do contato
- Tags (`tags`, list): Tags do contato
- Legal bases (`legal_bases`, list): Bases legais do contato
- Birth date (`birthdate`, date): The contact’s date of birth.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "bio": "example",
    "birthdate": "example",
    "city": "example",
    "country": "example",
    "email": "example",
    "extra_emails": [],
    "facebook": "example",
    "job_title": "example",
    "legal_bases": [],
    "linkedin": "example",
    "links": [],
    "mobile_phone": "example",
    "name": "example",
    "personal_phone": "example",
    "phone": "example",
    "state": "example",
    "tags": [],
    "twitter": "example",
    "uuid": "example",
    "website": "example"
  }
}
```

### Create a webhook subscription

Create a webhook subscription.

**Inputs**

- Event type (`event_type`, text, required): O tipo de evento que aciona a solicitação de webhook. Atualmente somente eventos de negociação, conversão e oportunidade são suportados. One of: `WEBHOOK.CONVERTED`, `WEBHOOK.MARKED_OPPORTUNITY` (Webhook.marked opportunity).
- Entity type (`entity_type`, text, required): A entidade da assinatura do webhook. Por enquanto, 'CONTATO' é a única opção aceita. One of: `CONTACT`.
- Event IDentifiers (`event_identifiers`, list): Os identificadores dos eventos que devem acionar o webhook. Apenas para eventos 'WEBHOOK.CONVERTED'
- Url (`url`, text, required): A URL de destino do webhook
- Http method (`http_method`, text, required): O método http que o webhook acionará. Atualmente, apenas o método 'POST' é suportado. One of: `POST`.
- Include relations (`include_relations`, list): Quais itens adicionais serão fornecidos no payload do webhook. Apenas 'COMPANY' e 'CONTACT_FUNNEL' são opções válidas

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "entity_type": "example",
    "event_identifiers": [],
    "event_type": "example",
    "http_method": "example",
    "include_relations": [],
    "platform_account_id": 1.0,
    "source": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example",
    "uuid": "example"
  }
}
```

### Create or update a contact

Create or update a contact.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.
- Name (`name`, text): Nome do contato
- Email (`email`, text): Email do contato
- Job title (`job_title`, text): Cargo do contato
- Website (`website`, text): Site do contato
- Personal phone (`personal_phone`, text): Telefone do contato
- Mobile phone (`mobile_phone`, text): Telefone do contato
- City (`city`, text): Cidade do contato
- State (`state`, text): Estado do contato
- Country (`country`, text): País do contato
- Tags (`tags`, list): Tags do contato
- Legal bases (`legal_bases`, list): Bases legais do contato
- Birth date (`birthdate`, date): The contact’s date of birth.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "bio": "example",
    "birthdate": "example",
    "city": "example",
    "country": "example",
    "email": "example",
    "extra_emails": [],
    "facebook": "example",
    "job_title": "example",
    "legal_bases": [],
    "linkedin": "example",
    "links": [],
    "mobile_phone": "example",
    "name": "example",
    "personal_phone": "example",
    "phone": "example",
    "state": "example",
    "tags": [],
    "twitter": "example",
    "uuid": "example",
    "website": "example"
  }
}
```

### Delete a contact

Delete a contact.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {}
}
```

### Delete a webhook subscription

Delete a webhook subscription.

**Inputs**

- Uuid (`uuid`, text, required): O UUID exclusivo associado a cada webhook do RD Station.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {}
}
```

### Get a contact

Get a contact.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "bio": "example",
    "birthdate": "example",
    "city": "example",
    "country": "example",
    "email": "example",
    "extra_emails": [],
    "facebook": "example",
    "job_title": "example",
    "legal_bases": [],
    "linkedin": "example",
    "links": [],
    "mobile_phone": "example",
    "name": "example",
    "personal_phone": "example",
    "phone": "example",
    "state": "example",
    "tags": [],
    "twitter": "example",
    "uuid": "example",
    "website": "example"
  }
}
```

### Get a contact funnel

Get a contact funnel.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "contact_owner_email": "example",
    "fit": 1,
    "interest": 1,
    "lifecycle_stage": "example",
    "opportunity": false
  }
}
```

### Get conversion analytics

Get conversion analytics.

**Inputs**

- Start date (`start_date`, date, required): Data de início a ser consultada. (yyyy-mm-dd)
- End date (`end_date`, date, required): Data de término a ser consultada. (yyyy-mm-dd)
- Assets type (`assets_type`, list): Filtros para tipo do ativo, opções disponíveis: LandingPage, Popup e Forms. One or more of: `LandingPage`, `Popup`, `Forms`.
- Asset ID (`asset_id`, list): Filtro para o Id do asset (opcional)

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "assets_type": [],
    "conversions": [],
    "query_date": {
      "end_date": "example",
      "start_date": "example"
    }
  }
}
```

### Get email campaign analytics

Get email campaign analytics.

**Inputs**

- Start date (`start_date`, date, required): Data de início a ser consultada. (yyyy-mm-dd)
- End date (`end_date`, date, required): Data de término a ser consultada. (yyyy-mm-dd)
- Campaign ID (`campaign_id`, list): Filtro para o Id do asset (opcional)

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "emails": [],
    "query_date": {
      "end_date": "example",
      "start_date": "example"
    }
  }
}
```

### Get sales funnel analytics

Get sales funnel analytics.

**Inputs**

- Start date (`start_date`, date, required): Data de início a ser consultada. (yyyy-mm-dd)
- End date (`end_date`, date, required): Data de término a ser consultada. (yyyy-mm-dd)
- Grouped by (`grouped_by`, text): Filtro para agrupamento do período de análise, opções são: daily, weekly e monthly. Requisições sem esse campo preenchido retornam dados diários. One of: `daily`, `weekly`, `monthly`.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "funnel": [],
    "grouped_by": "example",
    "query_date": {
      "end_date": "example",
      "start_date": "example"
    }
  }
}
```

### Get workflow email analytics

Get workflow email analytics.

**Inputs**

- Start date (`start_date`, date, required): Data de início a ser consultada. (yyyy-mm-dd)
- End date (`end_date`, date, required): Data de término a ser consultada. (yyyy-mm-dd)
- Workflow ID (`automation_id`, list): Filtro para o Id do asset (opcional)

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "query_date": {
      "end_date": "example",
      "start_date": "example"
    },
    "workflow_email_statistics": []
  }
}
```

### List contacts in a segment

List contacts in a segment.

**Inputs**

- Segment ID (`segment_id`, text, required): The ID from the RD Station Marketing segment you want to watch.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 125.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "contacts": [],
    "pagination": {
      "total_rows": 1
    }
  }
}
```

### List webhook subscriptions

List webhook subscriptions.

**Inputs**: None.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "webhooks": []
  }
}
```

### Update a contact funnel

Update the contact’s stage, opportunity status, or owner while preserving other funnel settings.

**Inputs**

- Identifier type (`identifier_type`, text, required): Identificador (uuid/email/phone) associado a cada contato do RD Station. One of: `uuid`, `email`, `phone`.
- Contact identifier (`contact_identifier`, text, required): Valor do identificador.
- Lifecycle stage (`lifecycle_stage`, text): The stage of the contact in the funnel. One of: `Lead`, `Qualified Lead`, `Client`.
- Opportunity (`opportunity`, true/false): Whether the contact is an opportunity.
- Contact owner email (`contact_owner_email`, text): The email of the contact owner.

**Outputs**

- `data` (object): The response from RD Station.

**Example output**

```json
{
  "data": {
    "contact_owner_email": "example",
    "fit": 1,
    "interest": 1,
    "lifecycle_stage": "example",
    "opportunity": false
  }
}
```
