We have launched new Action types in Array Function to make it more powerful.
1. Action Type: Find by Index
– Select the Find by Index action type from the dropdown. This action type will help in finding the array’s index data.
– All the fields with data type array available in the workflow are listed here. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger, and Custom Webhook action response data.
Select Shopify → Line Items
– The entered index value will return.
2. Action Type: Line Items
– Select the Line Items action type from the dropdown. This action type will help to reconstruct an array with custom keys.
Use case
– To reconstruct the array structure before sending it via Custom Webhook
– To reconstruct the array before storing it in Google Sheets (Create Rows – later)
– To reconstruct the array to match the Email Builder Shopping cart structure
– All the fields with data type array available in the workflow are listed here. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger, and Custom Webhook action response data.
Select Shopify → Line Items
– Enter the custom value in the Key input field and select the corresponding value from the value dropdown.
– Add another item – You can also find the matching object with multiple key-value pairs by adding another key-value item.
3. Action Type: Math
– Select the Math action type from the dropdown. This action type will help to calculate Sum, Min, Max, and Avg by matching key values in an array of objects.
Use case
– Eg: To calculate Sub total(line item total), Line Items in cart(count), Total items (qty).
– All the fields with data type array available in the workflow are listed here. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger, and Custom Webhook action response data.
Select Shopify → Line Items
– Select the Key value to find the matching index.
– The list of key variables from the selected array field are listed here. In this example, the list of Shopify line items’ key variables are listed.
– Select or deselect from the list of options available.