How to Pull Customer Product Details into Sparkforge Workflows

By Sparkforge Support Team ·Last reviewed May 3, 2026

Pluck and join are workflow helpers in Sparkforge. Pluck extracts a field from an array of line items, and join concatenates the values—useful for logging product data to Google Sheets or external systems.

The pluck and join helpers in Sparkforge workflows pull product details out of order data and format them into a single string. They’re built for automating order logging, syncing product info to external systems, and updating spreadsheets like Google Sheets.

What Pluck and Join Do

  • pluck: Extracts one field (for example, title) from every object in an array.
  • join: Concatenates the resulting values into a single string with a separator you choose.

Together they turn a list of line items into a clean, human-readable summary you can drop into any custom field.

Step-by-Step

Step 1: Choose a Trigger

Use a trigger that exposes a list of line items—for example, Order Submitted or an Inbound Webhook carrying order data.

Step 2: Add an Action

For example, Create Row in Google Sheets. Map the fields you want to log:

  • Customer Name: {{ contact.first_name }}
  • Email: {{ contact.email }}
  • Products: the formatted string from Step 3

Step 3: Add the Pluck and Join Logic

Extract the product titles:

{{ pluck order.line_items "title" }}

Then combine them into one comma-separated string:

{{ join (pluck order.line_items "title") ", " }}

Step 4: Test and Validate

Run a test order or send a sample webhook (Postman works well) to confirm the workflow produces the formatted string you expect.

Available Line-Item Fields

  • title
  • image
  • price
  • quantity
  • line_subtotal
  • line_discount
  • line_price
  • meta
  • product_id
  • price_id
  • order_id / invoice_id

Examples:

{{ pluck payment.line_items "title" }}
{{ pluck payment.line_items "line_subtotal" }}
{{ pluck payment.line_items "meta.product_id" }}

Replace the field name to pluck any other supported value.

Example: Log Orders to Google Sheets

Scenario

Every time a customer submits an order, log the customer’s name, email, and a comma-separated list of purchased products to a Google Sheet.

Steps

  1. Set the trigger to Order Submitted.
  2. Build the product string with pluck and join: {{ join (pluck order.line_items "title") ", " }}.
  3. Add a Create Row in Google Sheets action and map: Name = {{ contact.first_name }}, Email = {{ contact.email }}, Products = the formatted string.
  4. Submit a test order and confirm the row appears with the expected fields.

Example Output

NameEmailProducts
Alicealice@test.comTEST OFFER, ANOTHER PRODUCT
Bobbob@test.comSINGLE ITEM

Pluck and join keep order data flowing cleanly between Sparkforge and the rest of your stack—no manual exports, no copy-paste.

Frequently Asked Questions

Where can I use pluck and join?
Anywhere a workflow accepts custom field syntax. Use them inside action fields like Google Sheets cells, webhook payloads, or email bodies.
What separator should join use?
Whatever fits the destination. A comma and space (", ") works for human-readable lists. Use a pipe or newline for systems that parse delimited input.
Can I pluck nested fields?
Yes. Use dot notation—for example, {{ pluck order.line_items "meta.product_id" }} pulls the product_id from each item’s meta object.
Which triggers carry line items?
Order Submitted is the most common. Inbound webhooks work too, as long as the payload includes a line-items array on the order or payment object.

Was this article helpful?