Countertop Studio - Normalize Deal icon

Countertop Studio - Normalize Deal

Transforms incoming data into the standardized Deal payload format.

Countertop Studio - Normalize Deal

AI-generated

Summary

Transforms incoming data into a standardized Deal payload, optionally merging original fields for debugging.

Inputs

  • dealName (required) — Deal name string (e.g., {{$json.deal_name}}).
  • dealAdditionalFields — Optional fixed collection of additional deal fields; each has a key and value expression; empty values become null.
  • customerIds — Optional list of existing customer UUIDs to populate customer_ids.
  • customers — Optional list of new customer objects; each must include last_name and may include extra fields.
  • advanced — Enable advanced options to access keepOriginalFields.
  • keepOriginalFields — If true and advanced is enabled, merges original input data with normalized output.

Output shape

Array of items; each item contains a JSON object that merges the original input (when keepOriginalFields is true) with the normalized deal fields (name, additional fields, customer_ids, customers).

No output is produced if the input list is empty; original fields are omitted unless keepOriginalFields is enabled.

Examples

Example 1: Normalize a deal with name and volume field

Set Deal Name to {{$json.deal_name}}, add an Additional Deal Field with Field = volume and Value = {{$json.volume}}, optionally provide Customer IDs, then proceed to Validate Deal.

Example 2: Create new customers alongside a deal

Fill New Customers collection with last_name and email expressions; optionally add existing Customer IDs; keepOriginalFields disabled.

Example 3: Debug mode preserving original data

Enable Advanced and set Keep Original Fields to true; the node outputs the original payload merged with normalized fields for inspection.

Links

Discussion