# MendJourney

> A matter's attribution judgement: by order with supersededAt isNull for the current one, by rowId… Read access, attribution toolset, MCP tool get_mend_journey.

A matter's attribution judgement: by order with supersededAt isNull for the current one, by rowId for that generation. Verdict, reasons, each touchpoint's role, tier and trust.

**Access:** [Read](https://developer.missin.co.uk/get-started/authentication.md#access-levels)

## Variables

| Variable | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `filter` | `MendJudgementFilter!` | yes | Input object, below |  |

## Input types

A filter lists its fields by the type they take, and none of them is required.

### MendJudgementFilter

- `[MendJudgementFilter!]`: `and`, `or`
- [DatetimeFilter](https://developer.missin.co.uk/reference/input-types.md#datetimefilter): `computedAt`, `supersededAt`
- `Boolean`: `customerByCustomerIdExists`, `formResponseByFormResponseIdExists`, `mendJudgementBySupersededByIdExists`, `orderByOrderIdExists`
- [UUIDFilter](https://developer.missin.co.uk/reference/input-types.md#uuidfilter): `customerId`, `formResponseId`, `orderId`, `rowId`, `supersededById`, `workspaceId`
- [StringFilter](https://developer.missin.co.uk/reference/input-types.md#stringfilter): `mendStatus`, `subjectKind`
- `MendJudgementFilter`: `not`

## Call it

```bash curl
curl https://api.missin.co.uk/graphql/v1 \
  -H "Authorization: Bearer $MISSIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operationName":"MendJourney","variables":{"filter":{"and":[]}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"6e80113fe015831d8af045aec0e91529cd3811787efeb994ba5db79eb250cbef"}}}'
```

## Document

```graphql
query MendJourney($filter: MendJudgementFilter!) { __typename allMendJudgements(first: 1, filter: $filter, orderBy: [COMPUTED_AT_DESC]) { __typename nodes { __typename causeKind computedAt confidence id mendStatus mendTier mendTrust orderByOrderId { __typename attributedRevenue createdAt currencyByCurrencyId { __typename code decimalPlaces decimalSeparator id symbol symbolPosition thousandsSeparator } externalRef id integrationSlug orderNumber rowId } reasonCodes rowId subjectKind touchpointAttributionsByJudgementId(first: 12) { __typename nodes { __typename caused contributed evidencePct id marketingAdByMarketingAdId { __typename id name rowId startedAt } marketingSend { __typename id name rowId sentAt subject } mendStatus mendTier mendTrust partnerPost { __typename id partnerByPartnerId { __typename id name rowId username } postType publishedAt rowId title } role rowId touchpointId touchpointKind } totalCount } winnerTouchpointId } } }
```

Source: https://developer.missin.co.uk/reference/attribution/mend-journey
