productivity
Salesloft Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Salesloft KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.salesloft.*.
Use lua_read_doc("integrations.salesloft") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Salesloft workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.salesloft.list_users({page = 1, per_page = 1, email = "example_email"}))' --json kosmo integrations:lua --eval 'print(docs.read("salesloft"))' --json
kosmo integrations:lua --eval 'print(docs.read("salesloft.list_users"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local salesloft = app.integrations.salesloft
local result = salesloft.list_users({page = 1, per_page = 1, email = "example_email"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.salesloft, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.salesloft.default.* or app.integrations.salesloft.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Salesloft, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Salesloft Lua API Reference
Namespace: app.integrations.salesloft
Use this integration for Salesloft people, accounts, cadences, cadence
memberships, tasks, calls, emails, notes, users, current-user checks, and generic
relative API calls. Responses are parsed Salesloft JSON, usually with data and
metadata keys.
People And Accounts
| Function | Purpose |
|---|---|
list_people({ page?, per_page?, email_address?, account_id? }) | List people. |
get_person({ id }) | Get one person. |
create_person({ payload }) | Create a person with an official payload. |
update_person({ id, payload }) | Update a person. |
delete_person({ id }) | Delete a person. |
list_accounts({ page?, per_page?, domain? }) | List accounts. |
get_account({ id }) | Get one account. |
create_account({ payload }) | Create an account. |
update_account({ id, payload }) | Update an account. |
delete_account({ id }) | Delete an account. |
Use payload for official Salesloft request bodies so the package does not hide
new fields added by the API.
Cadences And Tasks
| Function | Purpose |
|---|---|
list_cadences({ page?, per_page?, owned_by_user_id? }) | List cadences. |
get_cadence({ id }) | Get one cadence. |
list_cadence_memberships({ page?, per_page?, cadence_id?, person_id? }) | List cadence memberships. |
create_cadence_membership({ payload }) | Add a person to a cadence. |
list_tasks({ page?, per_page?, user_id?, person_id?, due_on? }) | List tasks. |
get_task({ id }) | Get one task. |
update_task({ id, payload }) | Update a task. |
Activities
| Function | Purpose |
|---|---|
list_calls({ page?, per_page?, person_id?, user_id? }) | List call activities. |
create_call({ payload }) | Create a call activity. |
list_emails({ page?, per_page?, person_id?, user_id? }) | List email activities. |
list_notes({ page?, per_page?, person_id?, account_id? }) | List notes. |
create_note({ payload }) | Create a note. |
Users And Legacy Wrappers
| Function | Purpose |
|---|---|
list_users({ page?, per_page?, email? }) | List Salesloft users. |
get_user({ id }) | Get one Salesloft user. |
get_current_user({}) | Fetch /v3/users/me to identify the token owner. |
list_sequences({ limit?, page?, status? }) | Legacy compatibility wrapper for /v3/call-sequences. |
get_sequence({ id }) | Legacy compatibility wrapper for one call sequence. |
create_sequence({ name, steps?, owner_id?, status?, targets? }) | Legacy compatibility wrapper to create a call sequence. |
list_rules({ limit?, page? }) | Legacy compatibility wrapper for /v3/rules. |
get_rule({ id }) | Legacy compatibility wrapper for one rule. |
Prefer cadences and cadence memberships for current Salesloft workflow work.
Generic API Helpers
| Function | Purpose |
|---|---|
api_get({ path, params? }) | Send GET to a relative Salesloft API path. |
api_post({ path, payload? }) | Send POST to a relative Salesloft API path. |
api_put({ path, payload? }) | Send PUT to a relative Salesloft API path. |
api_delete({ path, payload? }) | Send DELETE to a relative Salesloft API path. |
Generic helpers reject absolute URLs. Use paths such as /v2/people,
/v2/tasks/123, or /v2/activities/calls so the host controls the API base URL
and credentials.
Multi-Account Usage
All functions work under account-specific namespaces:
app.integrations.salesloft.list_people({ per_page = 25 })
app.integrations.salesloft.default.list_people({})
app.integrations.salesloft.production.list_people({})Raw agent markdown
# Salesloft Lua API Reference
Namespace: `app.integrations.salesloft`
Use this integration for Salesloft people, accounts, cadences, cadence
memberships, tasks, calls, emails, notes, users, current-user checks, and generic
relative API calls. Responses are parsed Salesloft JSON, usually with `data` and
`metadata` keys.
## People And Accounts
| Function | Purpose |
|----------|---------|
| `list_people({ page?, per_page?, email_address?, account_id? })` | List people. |
| `get_person({ id })` | Get one person. |
| `create_person({ payload })` | Create a person with an official payload. |
| `update_person({ id, payload })` | Update a person. |
| `delete_person({ id })` | Delete a person. |
| `list_accounts({ page?, per_page?, domain? })` | List accounts. |
| `get_account({ id })` | Get one account. |
| `create_account({ payload })` | Create an account. |
| `update_account({ id, payload })` | Update an account. |
| `delete_account({ id })` | Delete an account. |
Use `payload` for official Salesloft request bodies so the package does not hide
new fields added by the API.
## Cadences And Tasks
| Function | Purpose |
|----------|---------|
| `list_cadences({ page?, per_page?, owned_by_user_id? })` | List cadences. |
| `get_cadence({ id })` | Get one cadence. |
| `list_cadence_memberships({ page?, per_page?, cadence_id?, person_id? })` | List cadence memberships. |
| `create_cadence_membership({ payload })` | Add a person to a cadence. |
| `list_tasks({ page?, per_page?, user_id?, person_id?, due_on? })` | List tasks. |
| `get_task({ id })` | Get one task. |
| `update_task({ id, payload })` | Update a task. |
## Activities
| Function | Purpose |
|----------|---------|
| `list_calls({ page?, per_page?, person_id?, user_id? })` | List call activities. |
| `create_call({ payload })` | Create a call activity. |
| `list_emails({ page?, per_page?, person_id?, user_id? })` | List email activities. |
| `list_notes({ page?, per_page?, person_id?, account_id? })` | List notes. |
| `create_note({ payload })` | Create a note. |
## Users And Legacy Wrappers
| Function | Purpose |
|----------|---------|
| `list_users({ page?, per_page?, email? })` | List Salesloft users. |
| `get_user({ id })` | Get one Salesloft user. |
| `get_current_user({})` | Fetch `/v3/users/me` to identify the token owner. |
| `list_sequences({ limit?, page?, status? })` | Legacy compatibility wrapper for `/v3/call-sequences`. |
| `get_sequence({ id })` | Legacy compatibility wrapper for one call sequence. |
| `create_sequence({ name, steps?, owner_id?, status?, targets? })` | Legacy compatibility wrapper to create a call sequence. |
| `list_rules({ limit?, page? })` | Legacy compatibility wrapper for `/v3/rules`. |
| `get_rule({ id })` | Legacy compatibility wrapper for one rule. |
Prefer cadences and cadence memberships for current Salesloft workflow work.
## Generic API Helpers
| Function | Purpose |
|----------|---------|
| `api_get({ path, params? })` | Send GET to a relative Salesloft API path. |
| `api_post({ path, payload? })` | Send POST to a relative Salesloft API path. |
| `api_put({ path, payload? })` | Send PUT to a relative Salesloft API path. |
| `api_delete({ path, payload? })` | Send DELETE to a relative Salesloft API path. |
Generic helpers reject absolute URLs. Use paths such as `/v2/people`,
`/v2/tasks/123`, or `/v2/activities/calls` so the host controls the API base URL
and credentials.
## Multi-Account Usage
All functions work under account-specific namespaces:
```lua
app.integrations.salesloft.list_people({ per_page = 25 })
app.integrations.salesloft.default.list_people({})
app.integrations.salesloft.production.list_people({})
``` local result = app.integrations.salesloft.list_users({page = 1, per_page = 1, email = "example_email"})
print(result) Functions
list_users Read
List Salesloft users with pagination and official filters.
- Lua path
app.integrations.salesloft.list_users- Full name
salesloft.salesloft_list_users
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
email | string | no | Filter by email. |
get_user Read
Get one Salesloft user by ID.
- Lua path
app.integrations.salesloft.get_user- Full name
salesloft.salesloft_get_user
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | User ID. |
list_people Read
List Salesloft people with pagination and common filters.
- Lua path
app.integrations.salesloft.list_people- Full name
salesloft.salesloft_list_people
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
email_address | string | no | Filter by email address. |
account_id | integer | no | Filter by account ID. |
get_person Read
Get one Salesloft person by ID.
- Lua path
app.integrations.salesloft.get_person- Full name
salesloft.salesloft_get_person
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Person ID. |
create_person Write
Create a Salesloft person using an official person payload.
- Lua path
app.integrations.salesloft.create_person- Full name
salesloft.salesloft_create_person
| Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Person creation payload. |
update_person Write
Update a Salesloft person by ID.
- Lua path
app.integrations.salesloft.update_person- Full name
salesloft.salesloft_update_person
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Person ID. |
payload | object | yes | Person update payload. |
delete_person Write
Delete a Salesloft person by ID.
- Lua path
app.integrations.salesloft.delete_person- Full name
salesloft.salesloft_delete_person
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Person ID. |
list_accounts Read
List Salesloft accounts with pagination and common filters.
- Lua path
app.integrations.salesloft.list_accounts- Full name
salesloft.salesloft_list_accounts
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
domain | string | no | Filter by domain. |
get_account Read
Get one Salesloft account by ID.
- Lua path
app.integrations.salesloft.get_account- Full name
salesloft.salesloft_get_account
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Account ID. |
create_account Write
Create a Salesloft account using an official account payload.
- Lua path
app.integrations.salesloft.create_account- Full name
salesloft.salesloft_create_account
| Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Account creation payload. |
update_account Write
Update a Salesloft account by ID.
- Lua path
app.integrations.salesloft.update_account- Full name
salesloft.salesloft_update_account
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Account ID. |
payload | object | yes | Account update payload. |
delete_account Write
Delete a Salesloft account by ID.
- Lua path
app.integrations.salesloft.delete_account- Full name
salesloft.salesloft_delete_account
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Account ID. |
list_cadences Read
List Salesloft cadences with pagination and filters.
- Lua path
app.integrations.salesloft.list_cadences- Full name
salesloft.salesloft_list_cadences
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
owned_by_user_id | integer | no | Filter by owner user ID. |
get_cadence Read
Get one Salesloft cadence by ID.
- Lua path
app.integrations.salesloft.get_cadence- Full name
salesloft.salesloft_get_cadence
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Cadence ID. |
list_cadence_memberships Read
List people currently or previously in Salesloft cadences.
- Lua path
app.integrations.salesloft.list_cadence_memberships- Full name
salesloft.salesloft_list_cadence_memberships
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
cadence_id | integer | no | Filter by cadence ID. |
person_id | integer | no | Filter by person ID. |
create_cadence_membership Write
Create a Salesloft cadence membership using an official payload.
- Lua path
app.integrations.salesloft.create_cadence_membership- Full name
salesloft.salesloft_create_cadence_membership
| Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Cadence membership payload. |
list_tasks Read
List Salesloft tasks with pagination and filters.
- Lua path
app.integrations.salesloft.list_tasks- Full name
salesloft.salesloft_list_tasks
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
user_id | integer | no | Filter by assigned user. |
person_id | integer | no | Filter by person. |
due_on | string | no | Filter by due date. |
get_task Read
Get one Salesloft task by ID.
- Lua path
app.integrations.salesloft.get_task- Full name
salesloft.salesloft_get_task
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Task ID. |
update_task Write
Update a Salesloft task by ID.
- Lua path
app.integrations.salesloft.update_task- Full name
salesloft.salesloft_update_task
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Task ID. |
payload | object | yes | Task update payload. |
list_calls Read
List Salesloft call activities with pagination and filters.
- Lua path
app.integrations.salesloft.list_calls- Full name
salesloft.salesloft_list_calls
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
person_id | integer | no | Filter by person. |
user_id | integer | no | Filter by user. |
create_call Write
Create a Salesloft call activity using an official call payload.
- Lua path
app.integrations.salesloft.create_call- Full name
salesloft.salesloft_create_call
| Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Call activity payload. |
list_emails Read
List Salesloft email activities with pagination and filters.
- Lua path
app.integrations.salesloft.list_emails- Full name
salesloft.salesloft_list_emails
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
person_id | integer | no | Filter by person. |
user_id | integer | no | Filter by user. |
list_notes Read
List Salesloft notes with pagination and filters.
- Lua path
app.integrations.salesloft.list_notes- Full name
salesloft.salesloft_list_notes
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
person_id | integer | no | Filter by person. |
account_id | integer | no | Filter by account. |
create_note Write
Create a Salesloft note using an official note payload.
- Lua path
app.integrations.salesloft.create_note- Full name
salesloft.salesloft_create_note
| Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Note payload. |
list_sequences Read
List call sequences from Salesloft. Returns sequences with their IDs, names, statuses, and metadata. Supports pagination and optional status filtering.
- Lua path
app.integrations.salesloft.list_sequences- Full name
salesloft.salesloft_list_sequences
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of sequences to return per page (default: 25). |
page | integer | no | Page number for pagination (default: 1). |
status | string | no | Filter sequences by status (e.g., "active", "paused"). |
get_sequence Read
Get detailed information about a specific call sequence in Salesloft by its ID.
- Lua path
app.integrations.salesloft.get_sequence- Full name
salesloft.salesloft_get_sequence
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The sequence ID. |
create_sequence Write
Create a new call sequence in Salesloft with steps, owner assignment, status, and targets.
- Lua path
app.integrations.salesloft.create_sequence- Full name
salesloft.salesloft_create_sequence
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the call sequence. |
steps | array | no | Array of step definitions for the sequence. Each step defines an action (e.g., call, email). |
owner_id | integer | no | ID of the user who will own this sequence. |
status | string | no | Initial status of the sequence (e.g., "active", "paused"). |
targets | array | no | Array of target people or account IDs to add to the sequence. |
list_rules Read
List automation rules from Salesloft. Returns rules with their IDs, names, conditions, and actions.
- Lua path
app.integrations.salesloft.list_rules- Full name
salesloft.salesloft_list_rules
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of rules to return per page (default: 25). |
page | integer | no | Page number for pagination (default: 1). |
get_rule Read
Get detailed information about a specific automation rule in Salesloft by its ID.
- Lua path
app.integrations.salesloft.get_rule- Full name
salesloft.salesloft_get_rule
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The rule ID. |
get_current_user Read
Get the profile of the currently authenticated Salesloft user. Useful for verifying credentials and identifying the connected account.
- Lua path
app.integrations.salesloft.get_current_user- Full name
salesloft.salesloft_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_get Read
Call a relative Salesloft API GET path, such as "/v2/people". Absolute URLs are rejected.
- Lua path
app.integrations.salesloft.api_get- Full name
salesloft.salesloft_api_get
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Salesloft API path. |
params | object | no | Query parameters. |
api_post Write
Call a relative Salesloft API POST path. Absolute URLs are rejected.
- Lua path
app.integrations.salesloft.api_post- Full name
salesloft.salesloft_api_post
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Salesloft API path. |
payload | object | no | JSON body. |
api_put Write
Call a relative Salesloft API PUT path. Absolute URLs are rejected.
- Lua path
app.integrations.salesloft.api_put- Full name
salesloft.salesloft_api_put
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Salesloft API path. |
payload | object | no | JSON body. |
api_delete Write
Call a relative Salesloft API DELETE path. Absolute URLs are rejected.
- Lua path
app.integrations.salesloft.api_delete- Full name
salesloft.salesloft_api_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Salesloft API path. |
payload | object | no | Optional JSON body. |