# NewProductRelationInput

input type

Create-input for a ProductRelation. The tenant (org group) is derived SERVER-SIDE from the principal — NEVER supplied here; sourceProductId (the parent — rides the header) and targetProductId are tenant-scoped server-side and must be ACTIVE; self-relation is refused; relationType must be a registered kind (the NAMED gate runs before parse).

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `caption` | [String](/types/#scalars) | no | Optional: when omitted the per-type default applies — the relation type (a relation carries no merchant code); when supplied it must be non-blank. |
| `sourceProductId` | [ID](/types/#scalars) `ID!` | yes | The SOURCE Product id. |
| `targetProductId` | [ID](/types/#scalars) `ID!` | yes | The TARGET Product id — immutable after birth; self-relation refused. |
| `relationType` | [String](/types/#scalars) `String!` | yes | The canned relation type — immutable after birth; unknown kinds refused by the NAMED gate. |
| `ordinal` | [Int](/types/#scalars) | no | The suggestion rank (LOWER = FIRST; 0..1000000) — defaulted to 0 when omitted. |

## Used by

- [createProductRelation](/reference/product-relation/createProductRelation/)
