> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/bamboohr/bamboohr/action-update-employee.md).

# Action: Update Employee

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscriptions</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/QfD5zyhzSwCXEmj0jifr" alt="" width="375"><figcaption></figcaption></figure>

<p align="center">The Update Employee action modifies an employee's existing record with new or updated information.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### Example User Story

I want to update an employee's details in BambooHR so that I can keep employee records accurate and up-to-date.

#### Fields

| Field Name | Field Type | Required |
| ---------- | ---------- | -------- |
| employeeId | String     | Yes      |
| firstName  | String     | No       |
| lastName   | String     | No       |
| jobTitle   | String     | No       |
| workEmail  | String     | No       |
| workPhone  | String     | No       |
| department | String     | No       |
| location   | String     | No       |
| status     | String     | No       |

### Related Connections

[BambooHR](/human-connections/bamboohr/bamboohr.md)

### Related Automations

Example link

### Code (Apache v2.0): Operation

```
{
  "handle": "update-employee",
  "state": "inDev",
  "meta": {
    "short": "Update Employee",
    "description": "Update an existing employee's details in BambooHR."
  },
  "input": [
    {
      "name": "employeeId",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The unique identifier for the employee in BambooHR."
      }
    },
    {
      "name": "firstName",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The first name of the employee."
      }
    },
    {
      "name": "lastName",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The last name of the employee."
      }
    },
    {
      "name": "jobTitle",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The job title of the employee."
      }
    },
    {
      "name": "workEmail",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The work email address of the employee."
      }
    },
    {
      "name": "workPhone",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The work phone number of the employee."
      }
    },
    {
      "name": "department",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The department of the employee."
      }
    },
    {
      "name": "location",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The location of the employee."
      }
    },
    {
      "name": "status",
      "type": "String",
      "required": false,
      "meta": {
        "description": "The employment status of the employee.",
        "options": ["active", "inactive", "on leave"]
      }
    }
  ],
  "output": [
    {
      "name": "success",
      "type": "Boolean",
      "selector": ["success"],
      "meta": {
        "description": "Indicates whether the update was successful."
      }
    },
    {
      "name": "employeeId",
      "type": "String",
      "selector": ["employeeId"],
      "meta": {
        "description": "The unique identifier for the updated employee."
      }
    }
  ],
  "steps": [
    {
      "type": "http",
      "http": {
        "method": "POST",
        "path": "/api/gateway.php/v1/employees/{{employeeId}}",
        "headers": {
          "Content-Type": "application/json",
          "Accept": "application/json"
        },
        "bodyTemplate": {
          "value": "{\n  \"firstName\": \"{{firstName}}\",\n  \"lastName\": \"{{lastName}}\",\n  \"jobTitle\": \"{{jobTitle}}\",\n  \"workEmail\": \"{{workEmail}}\",\n  \"workPhone\": \"{{workPhone}}\",\n  \"department\": \"{{department}}\",\n  \"location\": \"{{location}}\",\n  \"status\": \"{{status}}\"\n}",
          "placeholders": [
            {
              "name": "employeeId",
              "type": "String",
              "description": "The unique identifier for the employee in BambooHR.",
              "required": true
            },
            {
              "name": "firstName",
              "type": "String",
              "description": "The first name of the employee.",
              "required": false
            },
            {
              "name": "lastName",
              "type": "String",
              "description": "The last name of the employee.",
              "required": false
            },
            {
              "name": "jobTitle",
              "type": "String",
              "description": "The job title of the employee.",
              "required": false
            },
            {
              "name": "workEmail",
              "type": "String",
              "description": "The work email address of the employee.",
              "required": false
            },
            {
              "name": "workPhone",
              "type": "String",
              "description": "The work phone number of the employee.",
              "required": false
            },
            {
              "name": "department",
              "type": "String",
              "description": "The department of the employee.",
              "required": false
            },
            {
              "name": "location",
              "type": "String",
              "description": "The location of the employee.",
              "required": false
            },
            {
              "name": "status",
              "type": "String",
              "description": "The employment status of the employee.",
              "required": false,
              "options": ["active", "inactive", "on leave"]
            }
          ]
        }
      }
    }
  ]
}

```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.planetcrust.com/human-connections/bamboohr/bamboohr/action-update-employee.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
