# Create Placement — Recruiterflow

> Records a successful candidate placement in Recruiterflow. See the documentation

- Key: `recruiterflow-create-placement`
- Type: Action (Write)
- Version: 0.0.1
- App: Recruiterflow (`recruiterflow`) — https://pipedream.com/apps/recruiterflow.md
- This page (HTML): https://pipedream.com/apps/recruiterflow/actions/create-placement
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/recruiterflow/actions/create-placement/create-placement.mjs

## Description

Records a successful candidate placement in Recruiterflow. [See the documentation](https://recruiterflow.com/swagger.yml)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `userId` | `string` | Yes | The ID of the user creating the placement Options are loaded from the connected account. |
| `candidateId` | `string` | Yes | The ID of the candidate being placed Options are loaded from the connected account. |
| `jobId` | `string` | Yes | The ID of the job for this placement Options are loaded from the connected account. |
| `jobStartDate` | `string` | Yes | The start date of the job (YYYY-MM-DD format, e.g., 2021-01-12) |
| `contractStartDate` | `string` | No | The contract start date (YYYY-MM-DD format, e.g., 2021-01-12) |
| `contractEndDate` | `string` | No | The contract end date (YYYY-MM-DD format, e.g., 2021-01-12) |
| `billingDate` | `string` | Yes | The billing date (YYYY-MM-DD format, e.g., 2021-01-12) |
| `salaryAmount` | `integer` | No | The salary amount |
| `salaryCurrency` | `string` | No | The currency for the salary (e.g., USD, EUR, GBP) |
| `revenueAmount` | `integer` | No | The placement revenue/fee amount |
| `revenueCurrency` | `string` | No | The currency for the revenue (e.g., USD, EUR, GBP) |
| `successFeeAmount` | `integer` | No | The success fee amount |
| `successFeeCurrency` | `string` | No | The currency for the success fee |
| `bonusAmount` | `integer` | No | The bonus amount |
| `bonusCurrency` | `string` | No | The currency for the bonus |
| `payRateAmount` | `integer` | No | The pay rate amount |
| `payRateCurrency` | `string` | No | The currency for the pay rate |
| `payRateFrequency` | `string` | No | The frequency of the pay rate |
| `billRateAmount` | `integer` | No | The bill rate amount |
| `billRateCurrency` | `string` | No | The currency for the bill rate |
| `billRateFrequency` | `string` | No | The frequency of the bill rate |
| `isFullTime` | `boolean` | No | Whether this is a full-time placement |
| `workQuantumNumber` | `integer` | No | The number of work units (e.g., 40 for 40 hours/week) |
| `workQuantumUnit` | `string` | No | The unit of work (e.g., Hours, Days) |
| `workQuantumFrequency` | `string` | No | The frequency of work quantum (e.g., Weekly, Monthly) |
| `contactIds` | `integer[]` | No | Array of contact IDs associated with this placement |
| `noteId` | `integer` | No | The ID of a note to associate with this placement |
| `revenueSplit` | `string[]` | No | Array of revenue split objects as JSON strings. Format: [{"user": {"id": 1}, "revenue": {"number": 5000, "pct": 50}}] |
| `customFields` | `string[]` | No | Array of custom field objects as JSON strings. Format: [{"id": 1, "value": "..."}] |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "recruiterflow",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "recruiterflow-create-placement",
  arguments: {
    userId: "User ID",
    candidateId: "Candidate ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "recruiterflow-create-placement",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    recruiterflow: { authProvisionId: "apn_xxxxxxx" },
    userId: "User ID",
    candidateId: "Candidate ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "recruiterflow-create-placement",
    "configured_props": {
      "recruiterflow": { "authProvisionId": "apn_xxxxxxx" },
      "userId": "User ID",
      "candidateId": "Candidate ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/recruiterflow.md · All apps: https://pipedream.com/apps
