# MarketSharp

> Work with MarketSharp, the CRM for home improvement contractors: find and read contacts, leads, appointments and jobs, record appointment results, add notes and activities, and start workflows when leads and appointments change.

App · 17 actions. Web page: https://docs.lodol.com/docs/integrations/marketsharp

## Actions

### Add activity

Add an activity to a contact: a call, email, text, to-do or next action, with a due date, an employee and a reminder. MarketSharp's automation rules don't run on it.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.
- Type (`activity_type`, text, required): What kind of activity. One of: `CallOut` (Call out), `CallIn` (Call in), `EmailOut` (Email out), `EmailIn` (Email in), `TextOut` (Text out), `TextIn` (Text in), `MailOut` (Mail out), `MailIn` (Mail in), `ToDo` (To do), `NextAction` (Next action), and 6 more.
- Name (`name`, text, required): What the activity is, such as Call back about quote.
- Note (`note`, text): Details.
- Due (`due_date`, date and time): When it's due.
- Assigned to (`assigned_employee_id`, text): The employee it's for.
- Inquiry ID (`inquiry_id`, text): The inquiry's MarketSharp id, to tie it to that inquiry.
- Appointment ID (`appointment_id`, text): The appointment's MarketSharp id, to tie it to that appointment.
- Job ID (`job_id`, text): The job's MarketSharp id, to tie it to that job.
- Result (`result_id`, text): The activity's result, from your activity results.
- Reminder (`reminder`, text): When to remind the employee. Defaults to no reminder. One of: `NoReminder` (No reminder), `FifteenMinutes` (15 minutes before), `ThirtyMinutes` (30 minutes before), `OneHour` (1 hour before), `TwoHours` (2 hours before), `ThreeHours` (3 hours before), `FourHours` (4 hours before), `SixHours` (6 hours before), `EightHours` (8 hours before), `TwelveHours` (12 hours before), and 7 more. Default: `NoReminder`.
- Completed (`completed`, true/false): Turn on to mark it done now, such as for a call already made.

**Outputs**

- `activity_id` (text): The new activity's ID
- `contact_id` (text): The contact's ID
- `name` (text): The activity's name

**Example output**

```json
{
  "activity_id": "f1b2c3d4-0000-4000-8000-000000000006",
  "contact_id": "a1b2c3d4-0000-4000-8000-000000000001",
  "name": "Call back about quote"
}
```

### Add contact note

Add a note to a contact, from an employee.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.
- Note (`note`, text, required): What to note.
- Employee (`employee_id`, text, required): Who the note is from.
- Date (`note_time`, date and time): The note's date and time. Defaults to now.

**Outputs**

- `contact_id` (text): The contact's ID
- `note_id` (text): The new note's ID, empty if MarketSharp didn't list it
- `notes` (list): The contact's notes after the change

**Example output**

```json
{
  "contact_id": "a1b2c3d4-0000-4000-8000-000000000001",
  "note_id": "d1b2c3d4-0000-4000-8000-000000000004",
  "notes": [
    {
      "allowEdit": true,
      "dateTime": "2026-11-20T10:15:00",
      "id": "d1b2c3d4-0000-4000-8000-000000000004",
      "note": "Called, will decide next week.",
      "source": "Contact",
      "type": "ContactNote"
    }
  ]
}
```

### Delete contact note

Delete a note from a contact.

**Inputs**

- Note ID (`note_id`, text, required): The note's MarketSharp id, from 'List a contact's notes' or 'Add contact note'.
- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.
- Employee (`employee_id`, text, required): The employee deleting it.

**Outputs**

- `contact_id` (text): The contact's ID
- `deleted` (true/false): True once deleted
- `note_id` (text): The note's ID

**Example output**

```json
{
  "contact_id": "a1b2c3d4-0000-4000-8000-000000000001",
  "deleted": true,
  "note_id": "d1b2c3d4-0000-4000-8000-000000000004"
}
```

### Find contacts

Find contacts by name, business, email, phone or address, as MarketSharp's quick find does.

**Inputs**

- Last name (`last_name`, text): The contact's last name, or the start of it.
- First name (`first_name`, text): The contact's first name.
- Business name (`business_name`, text): The contact's business.
- Email (`email_address`, text): An email address.
- Phone (`phone_number`, text): A phone number.
- Street address (`address`, text): The first line of the address.
- City (`city`, text): The city.
- State (`state`, text): The state, such as IA.
- ZIP code (`zip_code`, text): The ZIP code.
- How many (`limit`, number): The most to return, up to 1,000. Defaults to 25. From 1 to 1000.

**Outputs**

- `contacts` (list): The contacts found
- `count` (number): How many came back

**Example output**

```json
{
  "contacts": [
    {
      "addressLineOne": "12 Oak Street",
      "city": "Cedar Rapids",
      "company": "",
      "contactTypeDisplay": "Lead",
      "firstName": "Jo",
      "lastName": "Bloggs",
      "oid": "a1b2c3d4-0000-4000-8000-000000000001",
      "phoneNumbers": [
        "(319) 555-0101"
      ],
      "primaryEmail": "jo@example.com",
      "state": "IA",
      "zip": "52402"
    }
  ],
  "count": 1
}
```

### Get appointment

Get an appointment with its time, salesperson, result and address.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's MarketSharp id, such as one a list step returned.

**Outputs**

- `appointment` (object): The appointment

**Example output**

```json
{
  "appointment": {
    "address": "12 Oak Street",
    "appointmentDateTime": "2026-11-25T14:00:00",
    "city": "Cedar Rapids",
    "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
    "id": "c1b2c3d4-0000-4000-8000-000000000003",
    "inquiryId": "b1b2c3d4-0000-4000-8000-000000000002",
    "lastModifiedDate": "2026-11-20T10:15:00",
    "notes": "",
    "result": "",
    "resultReason": "",
    "salesperson": "Pat Sales",
    "salesperson2": "",
    "setBy": "Sam Office",
    "state": "IA",
    "type": "Sales Presentation",
    "zip": "52402"
  }
}
```

### Get company

Get the MarketSharp company the connection signs in to: its name, address, phone and time zone.

**Inputs**: None.

**Outputs**

- `company` (object): The company
- `company_id` (text): The company's ID

**Example output**

```json
{
  "company": {
    "address": "1 Main Street",
    "city": "Cedar Rapids",
    "email": "office@example.com",
    "name": "Acme Windows",
    "phonenumber": "(319) 555-0199",
    "state": "IA",
    "timezone": "Central Standard Time",
    "website": "https://example.com",
    "zip": "52401"
  },
  "company_id": "5"
}
```

### Get contact

Get a contact's name, address, emails, phone numbers and type.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "address": "12 Oak Street",
    "addressLine2": "",
    "cellPhone": "(319) 555-0101",
    "city": "Cedar Rapids",
    "contactBusinessName": "",
    "contactType": "Lead",
    "email1": "jo@example.com",
    "email2": "",
    "firstName": "Jo",
    "homePhone": "(319) 555-0100",
    "id": "a1b2c3d4-0000-4000-8000-000000000001",
    "isActive": true,
    "lastModifiedDateTime": "2026-11-20T10:15:00",
    "lastName": "Bloggs",
    "state": "IA",
    "workPhone": "",
    "zip": "52402"
  }
}
```

### Get inquiry

Get an inquiry (lead) with its status, lead sources, products of interest and address.

**Inputs**

- Inquiry ID (`inquiry_id`, text, required): The inquiry's MarketSharp id, such as one a list step returned.

**Outputs**

- `inquiry` (object): The inquiry

**Example output**

```json
{
  "inquiry": {
    "addressLineOne": "12 Oak Street",
    "city": "Cedar Rapids",
    "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
    "division": "Windows",
    "id": "b1b2c3d4-0000-4000-8000-000000000002",
    "inquiryDateTime": "2026-11-18T09:00:00",
    "inquiryStatus": "Appointment set",
    "lastModifiedDateTime": "2026-11-20T10:15:00",
    "notes": "Wants a quote for six windows",
    "primaryLeadSource": "Website",
    "productInterests": "Windows",
    "secondaryLeadSource": "Contact form",
    "state": "IA",
    "takenBy": "Sam Office",
    "zip": "52402"
  }
}
```

### Get job

Get a job with its status, site address, sale date and contract total.

**Inputs**

- Job ID (`job_id`, text, required): The job's MarketSharp id, such as one a list step returned.

**Outputs**

- `job` (object): The job

**Example output**

```json
{
  "job": {
    "addressLine1": "12 Oak Street",
    "city": "Cedar Rapids",
    "completionDate": "2026-12-15T00:00:00",
    "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
    "contractDate": "2026-11-25T00:00:00",
    "contractTotal": 12500.0,
    "id": "g1b2c3d4-0000-4000-8000-000000000007",
    "jobName": "Bloggs windows",
    "jobStatus": "Sold",
    "jobType": "Windows",
    "leadId": "b1b2c3d4-0000-4000-8000-000000000002",
    "saleDate": "2026-11-25T00:00:00",
    "state": "IA",
    "zip": "52402"
  }
}
```

### List a contact's appointments

List every appointment a contact has.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.

**Outputs**

- `appointments` (list): The contact's appointments
- `count` (number): How many came back

**Example output**

```json
{
  "appointments": [
    {
      "address": "12 Oak Street",
      "appointmentDateTime": "2026-11-25T14:00:00",
      "city": "Cedar Rapids",
      "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
      "id": "c1b2c3d4-0000-4000-8000-000000000003",
      "inquiryId": "b1b2c3d4-0000-4000-8000-000000000002",
      "lastModifiedDate": "2026-11-20T10:15:00",
      "notes": "",
      "result": "",
      "resultReason": "",
      "salesperson": "Pat Sales",
      "salesperson2": "",
      "setBy": "Sam Office",
      "state": "IA",
      "type": "Sales Presentation",
      "zip": "52402"
    }
  ],
  "count": 1
}
```

### List a contact's inquiries

List every inquiry (lead) a contact has.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.

**Outputs**

- `count` (number): How many came back
- `inquiries` (list): The contact's inquiries

**Example output**

```json
{
  "count": 1,
  "inquiries": [
    {
      "addressLineOne": "12 Oak Street",
      "city": "Cedar Rapids",
      "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
      "division": "Windows",
      "id": "b1b2c3d4-0000-4000-8000-000000000002",
      "inquiryDateTime": "2026-11-18T09:00:00",
      "inquiryStatus": "Appointment set",
      "lastModifiedDateTime": "2026-11-20T10:15:00",
      "notes": "Wants a quote for six windows",
      "primaryLeadSource": "Website",
      "productInterests": "Windows",
      "secondaryLeadSource": "Contact form",
      "state": "IA",
      "takenBy": "Sam Office",
      "zip": "52402"
    }
  ]
}
```

### List a contact's notes

List every note on a contact, of every kind (contact, inquiry, appointment and job notes).

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's MarketSharp id, such as one a list step returned.

**Outputs**

- `count` (number): How many came back
- `notes` (list): The notes

**Example output**

```json
{
  "count": 1,
  "notes": [
    {
      "allowEdit": true,
      "dateTime": "2026-11-20T10:15:00",
      "id": "d1b2c3d4-0000-4000-8000-000000000004",
      "note": "Called, will decide next week.",
      "source": "Contact",
      "type": "ContactNote"
    }
  ]
}
```

### List appointments

List appointments changed in a time range, set in a date range, or for given inquiries, with their salesperson and result. Gets one page; run it again with the next page to see more.

**Inputs**

- Changed since (`modified_since`, date and time): Only those changed at or after this time.
- Changed until (`modified_until`, date and time): Only those changed at or before this time.
- Appointment from (`appointment_from`, date and time): Only those with an appointment at or after this time.
- Appointment until (`appointment_until`, date and time): Only those with an appointment at or before this time.
- Salesperson (`salesperson_id`, text): Only those with an appointment for this salesperson.
- Inquiry IDs (`inquiry_ids`, list): Only appointments for these inquiries, up to 100.
- Page (`page`, number): Which page of results, from 1. At least 1.
- Rows per page (`rows_per_page`, number): How many on a page, up to 1,000 (MarketSharp's default). From 1 to 1000.

**Outputs**

- `appointments` (list): The appointments
- `count` (number): How many came back
- `page` (number): The page read

**Example output**

```json
{
  "appointments": [
    {
      "address": "12 Oak Street",
      "appointmentDateTime": "2026-11-25T14:00:00",
      "city": "Cedar Rapids",
      "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
      "id": "c1b2c3d4-0000-4000-8000-000000000003",
      "inquiryId": "b1b2c3d4-0000-4000-8000-000000000002",
      "lastModifiedDate": "2026-11-20T10:15:00",
      "notes": "",
      "result": "",
      "resultReason": "",
      "salesperson": "Pat Sales",
      "salesperson2": "",
      "setBy": "Sam Office",
      "state": "IA",
      "type": "Sales Presentation",
      "zip": "52402"
    }
  ],
  "count": 1,
  "page": 1
}
```

### List contacts

List contacts changed since a time, or with an appointment in a date range. Gets one page; run it again with the next page to see more.

**Inputs**

- Changed since (`modified_since`, date and time): Only those changed at or after this time.
- Appointment from (`appointment_from`, date and time): Only those with an appointment at or after this time.
- Appointment until (`appointment_until`, date and time): Only those with an appointment at or before this time.
- Salesperson (`salesperson_id`, text): Only those with an appointment for this salesperson.
- Page (`page`, number): Which page of results, from 1. At least 1.
- Rows per page (`rows_per_page`, number): How many on a page, up to 1,000 (MarketSharp's default). From 1 to 1000.

**Outputs**

- `contacts` (list): The contacts
- `count` (number): How many came back
- `page` (number): The page read

**Example output**

```json
{
  "contacts": [
    {
      "address": "12 Oak Street",
      "addressLine2": "",
      "cellPhone": "(319) 555-0101",
      "city": "Cedar Rapids",
      "contactBusinessName": "",
      "contactType": "Lead",
      "email1": "jo@example.com",
      "email2": "",
      "firstName": "Jo",
      "homePhone": "(319) 555-0100",
      "id": "a1b2c3d4-0000-4000-8000-000000000001",
      "isActive": true,
      "lastModifiedDateTime": "2026-11-20T10:15:00",
      "lastName": "Bloggs",
      "state": "IA",
      "workPhone": "",
      "zip": "52402"
    }
  ],
  "count": 1,
  "page": 1
}
```

### List employees

List the company's employees with their ids, to assign notes, activities and appointment results.

**Inputs**

- Include inactive (`include_inactive`, true/false): Turn on to list former employees too.

**Outputs**

- `count` (number): How many came back
- `employees` (list): The employees

**Example output**

```json
{
  "count": 1,
  "employees": [
    {
      "id": "e1b2c3d4-0000-4000-8000-000000000005",
      "isActive": true,
      "name": "Pat Sales"
    }
  ]
}
```

### List inquiries

List inquiries (leads) changed in a time range or with an appointment in one, with their status and lead source. Gets one page; run it again with the next page to see more.

**Inputs**

- Changed since (`modified_since`, date and time): Only those changed at or after this time.
- Changed until (`modified_until`, date and time): Only those changed at or before this time.
- Appointment from (`appointment_from`, date and time): Only those with an appointment at or after this time.
- Appointment until (`appointment_until`, date and time): Only those with an appointment at or before this time.
- Salesperson (`salesperson_id`, text): Only those with an appointment for this salesperson.
- Only with an appointment (`only_with_appointment`, true/false): Turn on to list only inquiries that have an appointment.
- Page (`page`, number): Which page of results, from 1. At least 1.
- Rows per page (`rows_per_page`, number): How many on a page, up to 1,000 (MarketSharp's default). From 1 to 1000.

**Outputs**

- `count` (number): How many came back
- `inquiries` (list): The inquiries
- `page` (number): The page read

**Example output**

```json
{
  "count": 1,
  "inquiries": [
    {
      "addressLineOne": "12 Oak Street",
      "city": "Cedar Rapids",
      "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
      "division": "Windows",
      "id": "b1b2c3d4-0000-4000-8000-000000000002",
      "inquiryDateTime": "2026-11-18T09:00:00",
      "inquiryStatus": "Appointment set",
      "lastModifiedDateTime": "2026-11-20T10:15:00",
      "notes": "Wants a quote for six windows",
      "primaryLeadSource": "Website",
      "productInterests": "Windows",
      "secondaryLeadSource": "Contact form",
      "state": "IA",
      "takenBy": "Sam Office",
      "zip": "52402"
    }
  ],
  "page": 1
}
```

### Record appointment result

Record how an appointment went, such as sold or no sale, with a reason and notes.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's MarketSharp id, such as one a list step returned.
- Result (`result_id`, text, required): The result, from your appointment results.
- Reason (`result_reason`, text): Why, such as Price too high.
- Notes (`notes`, text): Notes on the appointment.
- Recorded by (`employee_id`, text): The employee recording the result.

**Outputs**

- `appointment` (object): The appointment

**Example output**

```json
{
  "appointment": {
    "address": "12 Oak Street",
    "appointmentDateTime": "2026-11-25T14:00:00",
    "city": "Cedar Rapids",
    "contactId": "a1b2c3d4-0000-4000-8000-000000000001",
    "id": "c1b2c3d4-0000-4000-8000-000000000003",
    "inquiryId": "b1b2c3d4-0000-4000-8000-000000000002",
    "lastModifiedDate": "2026-11-20T10:15:00",
    "notes": "",
    "result": "Sold",
    "resultReason": "",
    "salesperson": "Pat Sales",
    "salesperson2": "",
    "setBy": "Sam Office",
    "state": "IA",
    "type": "Sales Presentation",
    "zip": "52402"
  }
}
```
