Files
twenty/packages/twenty-apps/internal/twenty-partners
Rashad Karanouh 4f1ffa0a96 fix(twenty-partners): coerce null fields in TFT opportunity import (#22017)
## What

The TFT `HTTP Request` action POSTs `null` for empty fields (e.g.
`amountMicros:null`, `closeDate:null`). The import schema typed those as
`z.number()/z.string().optional()`, which reject `null` (it is not
`undefined`), so the endpoint returned `ok:false / invalid_input` before
any API call.

## Fix

A `dropNulls` preprocessor on the request schema converts `null`
(top-level or nested) to "field absent" before validation. Null optional
fields are simply omitted from the created opportunity; required `name`
still fails correctly if null. No schema-shape or behaviour-contract
change.

## Tests

Added a case feeding the failing payload shape (`amountMicros:null`,
`closeDate:null`) → `created:true` with `amount`/`closeDate` omitted.
42/42 unit pass, lint clean.

Patch bump `1.1.1 → 1.1.2`.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22017?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
2026-06-23 17:37:41 +04:00
..

Twenty Partners

Turns the CRM into the operating system for the Twenty partner program: intake partner-eligible deals, match them to vetted marketplace partners, and track the matching pipeline end-to-end.

What's inside

  • Partner object — slug, status, availability, served geographies, languages spoken, deployment expertise, Calendly link, and last-match timestamp.
  • Opportunity extensions — match status, design-doc status, intro and relance timestamps, and a relation to the matched partner.
  • Automatic matching — when an opportunity is set to auto-match, the longest-idle available partner is assigned and the deal is marked matched; if none is available it is handed off for manual matching with an explanatory note.
  • Views — a waiting-for-match queue, a matching-funnel overview grouped by status, the partner index, and a log of matched deals, all surfaced in the sidebar.

Match status pipeline

matchStatus follows the deal lifecycle:

Status Meaning
TO_BE_MATCHED Default — deal entered, awaiting assignment
MANUAL_MATCH Needs a human to pick a partner
AUTO_MATCH Triggers automatic partner assignment
MATCHED Partner assigned
INTRODUCED_TO_A_PARTNER Customer intro sent
WORKING_WITH_A_PARTNER Engagement underway
IMPLEMENTING Active implementation
WON Deal closed won
RECONNECT_LATER Paused — reconnect in future
LOST Deal closed lost