# Skedulo

> Create, schedule, allocate and dispatch jobs, and manage accounts and contacts in Skedulo.

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

## Actions

### Allocate a resource

Allocate a resource (a person or team) to a job.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job.
- Resource (`resource_id`, text, required): The resource to allocate.
- Team leader (`team_leader`, true/false): Make this resource the job's team leader.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Cancel a job

Cancel a job, with the reason.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job (its UID).
- Reason (`reason`, text): Why the job was cancelled.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Create a contact

Add a contact, for an account if you choose.

**Inputs**

- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text, required): The contact's last name.
- Email (`email`, text): The contact's email address.
- Phone (`phone`, text): The contact's phone number.
- Mobile phone (`mobile_phone`, text): The contact's mobile number.
- Title (`title`, text): The contact's job title.
- Account (`account_id`, text): The account the contact belongs to.
- Region (`region_id`, text): The contact's region.
- Mailing street (`mailing_street`, text): The street of the mailing address.
- Mailing city (`mailing_city`, text): The mailing city.
- Mailing state (`mailing_state`, text): The mailing state.
- Mailing postal code (`mailing_postal_code`, text): The mailing postal code.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Create a job

Create a job in a region, with a start time and duration if it is scheduled.

**Inputs**

- Region (`region_id`, text, required): The region the job is in.
- Description (`description`, text, required): What the job is.
- Start (`start`, date and time): When the job starts. Its end is worked out from the duration.
- Duration (minutes) (`duration`, number, required): How long the job takes, in minutes. From 1 to 100000.
- Type (`type`, text): The job's type, as your Skedulo names it, such as Installation.
- Urgency (`urgency`, text): How urgent the job is. One of: `Normal`, `Urgent`, `Critical`.
- Address (`address`, text): Where the job is.
- Account (`account_id`, text): The customer account the job is for.
- Contact (`contact_id`, text): The contact for the job.
- Notes (`notes`, text): Notes for the people doing the job.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Create an account

Add a customer account.

**Inputs**

- Name (`name`, text, required): The account's name.
- Phone (`phone`, text): The account's phone number.
- Billing street (`billing_street`, text): The billing street address.
- Billing city (`billing_city`, text): The billing city.
- Billing state (`billing_state`, text): The billing state.
- Billing postal code (`billing_postal_code`, text): The billing postal code.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Delete a contact

Delete a contact.

**Inputs**

- Contact (`contact_id`, text, required): Skedulo's ID for the contact.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Delete a job

Delete a job and its allocations.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job (its UID).

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Delete an account

Delete a customer account.

**Inputs**

- Account (`account_id`, text, required): Skedulo's ID for the account.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Dispatch a job

Send a job to its allocated resources by text or push notification, so it moves to Dispatched.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job (its UID).
- Resources (`resource_ids`, list): Only notify these allocated resources. Leave empty for all of them.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "jobId": "example",
    "results": [
      {
        "error": "example",
        "protocol": "example",
        "resourceId": "example"
      }
    ]
  }
}
```

### Get a job

Get a job's details, with the resources allocated to it.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job (its UID).

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "AbortReason": "example",
    "Account": {
      "Name": "example",
      "UID": "example"
    },
    "AccountId": "example",
    "Address": "example",
    "Contact": {
      "FullName": "example",
      "UID": "example"
    },
    "ContactId": "example",
    "CreatedDate": "example",
    "Description": "example",
    "Duration": 1,
    "End": "example",
    "JobAllocationCount": 1,
    "JobStatus": "example",
    "LastModifiedDate": "example",
    "Locked": true,
    "Name": "example",
    "NotesComments": "example",
    "Region": {
      "Name": "example",
      "UID": "example"
    },
    "RegionId": "example",
    "Start": "example",
    "Timezone": "example",
    "Type": "example",
    "UID": "example",
    "Urgency": "example"
  }
}
```

### List accounts

List customer accounts, by name.

**Inputs**

- Name contains (`name`, text): Only accounts whose name contains this text.
- Extra filter (`filter`, text): More conditions in Skedulo's filter language (EQL), such as Type == 'Installation'. Added to the fields above with AND.
- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "BillingCity": "example",
        "BillingPostalCode": "example",
        "BillingState": "example",
        "BillingStreet": "example",
        "CreatedDate": "example",
        "Fax": "example",
        "LastModifiedDate": "example",
        "Name": "example",
        "Phone": "example",
        "ShippingCity": "example",
        "ShippingPostalCode": "example",
        "ShippingState": "example",
        "ShippingStreet": "example",
        "UID": "example"
      }
    ]
  }
}
```

### List allocations

List job allocations (who is assigned to which job), newest first.

**Inputs**

- Job (`job_id`, text): Only allocations for this job.
- Resource (`resource_id`, text): Only allocations for this resource.
- Statuses (`statuses`, list): Only allocations in these statuses. One or more of: `Pending Dispatch`, `Dispatched`, `Confirmed`, `En Route`, `Checked In`, `In Progress`, `Complete`, `Declined`, `Modified`, `Deleted`.
- Extra filter (`filter`, text): More conditions in Skedulo's filter language (EQL), such as Type == 'Installation'. Added to the fields above with AND.
- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "CreatedDate": "example",
        "DeclineReason": "example",
        "Duration": 1,
        "End": "example",
        "Job": {
          "JobStatus": "example",
          "Name": "example",
          "UID": "example"
        },
        "JobId": "example",
        "LastModifiedDate": "example",
        "Name": "example",
        "Resource": {
          "Name": "example",
          "UID": "example"
        },
        "ResourceId": "example",
        "Start": "example",
        "Status": "example",
        "TeamLeader": true,
        "TimeCompleted": "example",
        "TimePublished": "example",
        "TimeResponded": "example",
        "UID": "example"
      }
    ]
  }
}
```

### List contacts

List contacts, by name, email or account.

**Inputs**

- Last name contains (`name`, text): Only contacts whose last name contains this text.
- Email (`email`, text): Only the contact with this email address.
- Account (`account_id`, text): Only contacts for this account.
- Extra filter (`filter`, text): More conditions in Skedulo's filter language (EQL), such as Type == 'Installation'. Added to the fields above with AND.
- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "Account": {
          "Name": "example",
          "UID": "example"
        },
        "AccountId": "example",
        "CreatedDate": "example",
        "Email": "example",
        "FirstName": "example",
        "FullName": "example",
        "LastModifiedDate": "example",
        "LastName": "example",
        "MailingCity": "example",
        "MailingPostalCode": "example",
        "MailingState": "example",
        "MailingStreet": "example",
        "MobilePhone": "example",
        "Phone": "example",
        "RegionId": "example",
        "Title": "example",
        "UID": "example"
      }
    ]
  }
}
```

### List jobs

List jobs, soonest first, filtered by status, region, account or start time.

**Inputs**

- Statuses (`statuses`, list): Only jobs in these statuses. One or more of: `Queued`, `Pending Allocation`, `Pending Dispatch`, `Dispatched`, `Ready`, `En Route`, `On Site`, `In Progress`, `Complete`, `Cancelled`.
- Region (`region_id`, text): Only jobs in this region.
- Account (`account_id`, text): Only jobs for this account.
- Starting from (`start_from`, date and time): Only jobs starting at or after this time.
- Starting before (`start_to`, date and time): Only jobs starting before this time.
- Changed since (`modified_since`, date and time): Only jobs changed at or after this time.
- Extra filter (`filter`, text): More conditions in Skedulo's filter language (EQL), such as Type == 'Installation'. Added to the fields above with AND.
- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "AbortReason": "example",
        "Account": {
          "Name": "example",
          "UID": "example"
        },
        "AccountId": "example",
        "Address": "example",
        "Contact": {
          "FullName": "example",
          "UID": "example"
        },
        "ContactId": "example",
        "CreatedDate": "example",
        "Description": "example",
        "Duration": 1,
        "End": "example",
        "JobAllocationCount": 1,
        "JobStatus": "example",
        "LastModifiedDate": "example",
        "Locked": true,
        "Name": "example",
        "NotesComments": "example",
        "Region": {
          "Name": "example",
          "UID": "example"
        },
        "RegionId": "example",
        "Start": "example",
        "Timezone": "example",
        "Type": "example",
        "UID": "example",
        "Urgency": "example"
      }
    ]
  }
}
```

### List regions

List the regions jobs and resources belong to.

**Inputs**

- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "CountryCode": "example",
        "CreatedDate": "example",
        "Description": "example",
        "Name": "example",
        "Timezone": "example",
        "UID": "example"
      }
    ]
  }
}
```

### List resources

List resources (the people and teams who do jobs), by name.

**Inputs**

- Name contains (`name`, text): Only resources whose name contains this text.
- Region (`region_id`, text): Only resources whose main region is this one.
- Active (`active`, true/false): Only active resources (on) or only inactive ones (off).
- Extra filter (`filter`, text): More conditions in Skedulo's filter language (EQL), such as Type == 'Installation'. Added to the fields above with AND.
- Limit (`limit`, number): How many records to return, up to 200. From 1 to 200. Default: `50`.
- After cursor (`after`, text): Where to carry on from: the end cursor an earlier list step returned.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

```json
{
  "data": {
    "end_cursor": "example",
    "has_next_page": true,
    "records": [
      {
        "Category": "example",
        "CreatedDate": "example",
        "Email": "example",
        "EmploymentType": "example",
        "HomeAddress": "example",
        "IsActive": true,
        "LastModifiedDate": "example",
        "MobilePhone": "example",
        "Name": "example",
        "PrimaryPhone": "example",
        "PrimaryRegion": {
          "Name": "example",
          "UID": "example"
        },
        "PrimaryRegionId": "example",
        "ResourceType": "example",
        "UID": "example"
      }
    ]
  }
}
```

### Remove an allocation

Take a resource off a job by deleting its allocation.

**Inputs**

- Allocation ID (`allocation_id`, text, required): Skedulo's ID for the allocation (its UID).

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Update a contact

Change a contact's details. Fields left empty keep their values.

**Inputs**

- Contact (`contact_id`, text, required): Skedulo's ID for the contact.
- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Email (`email`, text): The contact's email address.
- Phone (`phone`, text): The contact's phone number.
- Mobile phone (`mobile_phone`, text): The contact's mobile number.
- Title (`title`, text): The contact's job title.
- Account (`account_id`, text): The account the contact belongs to.
- Region (`region_id`, text): The contact's region.
- Mailing street (`mailing_street`, text): The street of the mailing address.
- Mailing city (`mailing_city`, text): The mailing city.
- Mailing state (`mailing_state`, text): The mailing state.
- Mailing postal code (`mailing_postal_code`, text): The mailing postal code.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Update a job

Change a job's description, time, duration, type, urgency, address or notes. Fields left empty keep their values.

**Inputs**

- Job (`job_id`, text, required): Skedulo's ID for the job (its UID).
- Description (`description`, text): What the job is.
- Start (`start`, date and time): When the job starts. Its end is worked out from the duration.
- Duration (minutes) (`duration`, number): How long the job takes, in minutes. From 1 to 100000.
- Type (`type`, text): The job's type, as your Skedulo names it, such as Installation.
- Urgency (`urgency`, text): How urgent the job is. One of: `Normal`, `Urgent`, `Critical`.
- Address (`address`, text): Where the job is.
- Account (`account_id`, text): The customer account the job is for.
- Contact (`contact_id`, text): The contact for the job.
- Notes (`notes`, text): Notes for the people doing the job.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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

### Update an account

Change an account's name, phone or billing address. Fields left empty keep their values.

**Inputs**

- Account (`account_id`, text, required): Skedulo's ID for the account.
- Name (`name`, text): The account's name.
- Phone (`phone`, text): The account's phone number.
- Billing street (`billing_street`, text): The billing street address.
- Billing city (`billing_city`, text): The billing city.
- Billing state (`billing_state`, text): The billing state.
- Billing postal code (`billing_postal_code`, text): The billing postal code.

**Outputs**

- `data` (object): The response from Skedulo.

**Example output**

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