# JobNimbus

> Manage activities and products; read conversations and send messages with JobNimbus Engage.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/jobnimbus

## Actions

### Create activity

Create activity.

**Inputs**

- Content (`content`, text, required): Content.
- Activity type (`activity_type_id`, number, required): Activity type ID.
- Activity action (`activity_action`, text, required): Activity action.
- Primary record (`primary_record`, object, required): Primary record.
- Related records (`related_records`, list, required): Related records.
- Is private (`is_private`, true/false): Is private. Default: `false`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "activityAction": "example",
      "activityTypeId": 1,
      "content": "example",
      "createdAt": "example",
      "createdBy": {
        "id": "example",
        "name": "example"
      },
      "hasFiles": false,
      "id": "example",
      "isEditable": false,
      "isPrivate": false,
      "primaryRecord": {
        "id": "example",
        "name": "example",
        "type": "example"
      },
      "relatedRecords": [],
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Create product

Create product.

**Inputs**

- Name (`name`, text, required): Product name. Must be unique within the company's location bucket, compared trimmed and case-insensitively; a disabled product still holds its name. On update only a changed name or location is checked, so an unchanged product that already shares its name can still be saved. The 200-character limit applies after trimming; on update, an unchanged stored name that is already longer is accepted (exact, case-sensitive match after trimming). `refund` (trimmed, any case) is reserved for the system-man
- Description (`description`, text): Product description. Omitted or null stores an empty description.
- Item type (`item_type`, text): How the product is billed. One of `material`, `labor` or `laborAndMaterial`; omitted or null stores `material`. The legacy `material+labor` is accepted as `laborAndMaterial`. On update, a change into or out of `laborAndMaterial` needs `POST /v1/products/{id}/replace`. One of: `material`, `labor`, `laborAndMaterial`.
- Suppliers (`suppliers`, list): Links to products in supplier catalogs. Display data, such as the supplier product's name, comes from the Suppliers API by `id`.
- Tax exempt (`tax_exempt`, true/false): Whether the product is tax exempt. Omitted on create stores false; omitted on update keeps the stored value.
- Location ID (`location_id`, number): Location the product belongs to. Locations 0 and 1 are the same all-locations bucket: omitted and 0 are stored as 1, and an existing product keeps its stored location when this is omitted on update. A value above 1 scopes the product to that location and must be one of the company's active locations. From 0 to 10000.
- Enabled (`enabled`, true/false): Whether the product is visible. Omitted on create stores true; omitted on update keeps the stored value. Changing it on update requires the `settings` scope.
- Unit of measure (`unit_name`, text): Defaults to EA. Default: `EA`.
- Material price in cents (`material_price_cents`, number): Amount in USD cents. Defaults to zero. At least 0. Default: `0`.
- Material cost in cents (`material_cost_cents`, number): Amount in USD cents. Defaults to zero. At least 0. Default: `0`.
- Labor price in cents (`labor_price_cents`, number): Amount in USD cents. Defaults to zero. At least 0. Default: `0`.
- Labor cost in cents (`labor_cost_cents`, number): Amount in USD cents. Defaults to zero. At least 0. Default: `0`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "example",
      "createdBy": "example",
      "description": "example",
      "enabled": false,
      "id": "example",
      "isEditable": false,
      "itemType": "example",
      "locationId": 1,
      "name": "example",
      "suppliers": [],
      "taxExempt": false,
      "uoms": [],
      "updatedAt": "example",
      "updatedBy": "example"
    }
  }
}
```

### Delete activity

Delete activity.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Returned value.

**Example output**

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

### Delete product

Delete product.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Returned value.

**Example output**

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

### Find or create conversation

Find or create conversation.

**Inputs**

- Contact phone number (`contact_phone_number`, text, required): Contact phone number.
- Agent phone number (`agent_phone_number`, text, required): Agent phone number.
- Primary record (`primary_record`, object): Primary record.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "agentPhoneNumber": "example",
      "archivedAt": "example",
      "assignedUserId": "example",
      "companyId": "example",
      "contactDisplayName": "example",
      "contactId": "example",
      "contactPhoneNumber": "example",
      "createdAt": "example",
      "id": "example",
      "lastMessageAt": "example",
      "lastReadAt": "example",
      "messageCount": 1,
      "preview": {
        "mediaCount": 1,
        "text": "example"
      },
      "primaryRecord": {
        "id": "example",
        "type": "example"
      },
      "tabs": [],
      "unreadCount": 1,
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Get activity

Get activity.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "activityAction": "example",
      "activityTypeId": 1,
      "content": "example",
      "createdAt": "example",
      "createdBy": {
        "id": "example",
        "name": "example"
      },
      "hasFiles": false,
      "id": "example",
      "isEditable": false,
      "isPrivate": false,
      "primaryRecord": {
        "id": "example",
        "name": "example",
        "type": "example"
      },
      "relatedRecords": [],
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Get conversation

Get conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "agentPhoneNumber": "example",
      "archivedAt": "example",
      "assignedUserId": "example",
      "companyId": "example",
      "contactDisplayName": "example",
      "contactId": "example",
      "contactPhoneNumber": "example",
      "createdAt": "example",
      "id": "example",
      "lastMessageAt": "example",
      "lastReadAt": "example",
      "messageCount": 1,
      "preview": {
        "mediaCount": 1,
        "text": "example"
      },
      "primaryRecord": {
        "id": "example",
        "type": "example"
      },
      "tabs": [],
      "unreadCount": 1,
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Get conversation counts

Get conversation counts.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "tabs": {
        "active": {
          "unreadCount": 1
        },
        "archived": {
          "unreadCount": 1
        },
        "mine": {
          "unreadCount": 1
        },
        "others": {
          "unreadCount": 1
        },
        "unassigned": {
          "unreadCount": 1
        }
      }
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Get message

Get message.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Message ID (`message_id`, text, required): Message ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "authorDisplayName": "example",
      "authorUserId": "example",
      "body": "example",
      "carrierStatus": "example",
      "conversationId": "example",
      "createdAt": "example",
      "deliveryState": "scheduled",
      "direction": "inbound",
      "id": "example",
      "kind": "message",
      "media": [],
      "origin": "manual",
      "scheduledFor": "example",
      "sentAt": "example",
      "systemEventType": "example",
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Get product

Get product.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "example",
      "createdBy": "example",
      "description": "example",
      "enabled": false,
      "id": "example",
      "isEditable": false,
      "itemType": "example",
      "locationId": 1,
      "name": "example",
      "suppliers": [],
      "taxExempt": false,
      "uoms": [],
      "updatedAt": "example",
      "updatedBy": "example"
    }
  }
}
```

### List activities

List activities.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 100. Default: `100`.
- Cursor (`cursor`, text): Cursor.
- Sort (`sort`, text): Sort.
- Primary record ID (`primary_record_id`, text): Primary record ID.
- Primary record type (`primary_record_type`, text): Primary record type.
- Created by ID (`created_by_id`, text): Created by ID.
- Activity type ID (`activity_type_id`, number): Activity type ID.
- Activity type IDs (`activity_type_ids`, list): Activity type IDs.
- Relationship depth (`relationship_depth`, text): Relationship depth. One of: `self`, `connected`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": [],
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### List activity types

List activity types.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": [],
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### List conversations

List conversations.

**Inputs**

- Sort (`sort`, text): Sort.
- Page size (`page_size`, number): Page size. From 1 to 100. Default: `100`.
- Cursor (`cursor`, text): Cursor.
- Filter (`filter`, text): Filter.
- Assigned user ID (`assigned_user_id`, text): Assigned user ID.
- Archived (`archived`, true/false): Archived.
- Contact ID (`contact_id`, text): Contact ID.
- Job ID (`job_id`, text): Job ID.
- Contact phone number (`contact_phone_number`, text): Contact phone number.
- Agent phone number (`agent_phone_number`, text): Agent phone number.
- Phone numbers (`phone_numbers`, list): Phone numbers.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": [],
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### List messages

List messages.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Sort (`sort`, text): Sort.
- Page size (`page_size`, number): Page size. From 1 to 100. Default: `100`.
- Cursor (`cursor`, text): Cursor.
- Include system events (`include_system_events`, true/false): Include system events.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": [],
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### List products

List products.

**Inputs**

- Page (`page`, number): Page. From 1 to 2147483647. Default: `1`.
- Page size (`page_size`, number): Page size. From 1 to 100. Default: `100`.
- Status (`status`, text): Status.
- Search (`search`, text): Search.
- Item type (`item_type`, text): Item type. One of: `material`, `labor`, `laborAndMaterial`.
- Supplier (`supplier`, text): Supplier.
- Location ID (`location_id`, number): Location ID. From 0 to 2147483647.
- Sort by (`sort_by`, text): Sort by. One of: `name`. Default: `name`.
- Sort dir (`sort_dir`, text): Sort dir.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": [],
    "pagination": {
      "page": 1,
      "pageSize": 1,
      "totalItems": 1,
      "totalPages": 1
    }
  }
}
```

### List sending phone numbers

List sending phone numbers.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "defaultPhoneNumber": "example",
      "phoneNumbers": []
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Send message

Send message.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Idempotency key (`idempotency_key`, text): Idempotency key.
- Body (`body`, text): Body.
- Media IDs (`media_ids`, list): Media IDs.
- Scheduled for (`scheduled_for`, date and time): Scheduled for.
- Origin (`origin`, text): Origin.
- Origin detail (`origin_detail`, text): Origin detail.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "authorDisplayName": "example",
      "authorUserId": "example",
      "body": "example",
      "carrierStatus": "example",
      "conversationId": "example",
      "createdAt": "example",
      "deliveryState": "scheduled",
      "direction": "inbound",
      "id": "example",
      "kind": "message",
      "media": [],
      "origin": "manual",
      "scheduledFor": "example",
      "sentAt": "example",
      "systemEventType": "example",
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Set conversation read state

Set conversation read state.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Read (`read`, true/false): Read.
- Last read message ID (`last_read_message_id`, text): Last read message ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "lastReadAt": "example",
      "unreadCount": 1
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Update activity

Update activity.

**Inputs**

- Id (`id`, text, required): Id.
- Content (`content`, text): content.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "activityAction": "example",
      "activityTypeId": 1,
      "content": "example",
      "createdAt": "example",
      "createdBy": {
        "id": "example",
        "name": "example"
      },
      "hasFiles": false,
      "id": "example",
      "isEditable": false,
      "isPrivate": false,
      "primaryRecord": {
        "id": "example",
        "name": "example",
        "type": "example"
      },
      "relatedRecords": [],
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```

### Update conversation

Update conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Assigneduserid (`assigned_user_id`, text): assignedUserId.
- Archived (`archived`, true/false): archived.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "data": {
      "agentPhoneNumber": "example",
      "archivedAt": "example",
      "assignedUserId": "example",
      "companyId": "example",
      "contactDisplayName": "example",
      "contactId": "example",
      "contactPhoneNumber": "example",
      "createdAt": "example",
      "id": "example",
      "lastMessageAt": "example",
      "lastReadAt": "example",
      "messageCount": 1,
      "preview": {
        "mediaCount": 1,
        "text": "example"
      },
      "primaryRecord": {
        "id": "example",
        "type": "example"
      },
      "tabs": [],
      "unreadCount": 1,
      "updatedAt": "example"
    },
    "pagination": {
      "nextCursor": "example",
      "pageSize": 1
    }
  }
}
```
