K
Docs
↩️

Return

base.returnBase SetLogic

Ends the custom piece's flow and hands named values back to whoever called it. The fields shown here come from the returns you defined on this custom piece.

When to use this
  • Values you fill in here become {{<as>.<name>}} sparks for the caller
  • You can have multiple Return nodes — whichever runs first wins

On the canvas

This is what Return looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

↩️
Return
base.return
Logic
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
// Hand values back to whatever called this custom piece.
return { total: subtotal + tax, currency: "GBP" };
// The caller reads them as {{<as>.total}} and {{<as>.currency}}