# Create Sales Order

> Perform Create Sales Order through NikoHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_create_sales_order](https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_create_sales_order)

Integration: [NikoHealth](https://genhealth.ai/docs/workflows/integrations/nikohealth.md)

- Handler: `nikohealth_create_sales_order`

- Connection type: `nikohealth`

## Inputs

- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `service_location_id` — Service Location Id (text)
  Optional text value.
- `service_location_id_select` — Service Location Id Select (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `notes` — Notes (expression)
  Optional literal value or workflow expression.
- `order_tag_ids` — Order Tag Ids (expression)
  Optional literal value or workflow expression.
- `order_tag_ids_select` — Order Tag Ids Select (multi_select, dynamic options)
  Optional list of selected values. Retrieve allowed values from the dynamic options endpoint.

## Outputs

- `success` — Success
- `order_id` — Order Id
- `order_url` — Order Url
- `resource` — Resource
- `patient_id` — Patient Id
- `service_location_id` — Service Location Id
- `item_count` — Item Count
- `tag_ids` — Tag Ids
- `persisted_order_count` — Persisted Order Count
- `provider_resolution_warning` — Provider Resolution Warning
- `generic_fallback_warning` — Generic Fallback Warning
- `order_date_warning` — Order Date Warning
- `failure_category` — Failure Category
- `review_reason` — Review Reason
- `message` — Message
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "document_id",
    "patient_id"
  ],
  "properties": {
    "notes": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "order_tag_ids": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "service_location_id": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "order_tag_ids_select": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional list of selected values. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "multi_select"
    },
    "service_location_id_select": {
      "type": "string",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "message": {},
    "success": {},
    "tag_ids": {},
    "order_id": {},
    "resource": {},
    "order_url": {},
    "item_count": {},
    "patient_id": {},
    "review_reason": {},
    "failure_category": {},
    "order_date_warning": {},
    "service_location_id": {},
    "persisted_order_count": {},
    "generic_fallback_warning": {},
    "provider_resolution_warning": {}
  },
  "additionalProperties": true
}
```
