Array Functions Premium Action & Action Types

💸 [Workflow] Array Functions Premium Action - New Action Types

Workflow - Array Functions Premium Action Print

Modified on: Wed, 20 Dec, 2023 at 5:38 AM


In this Article

  • What is Array Function?

  • How to use new Action Types?

    • Add the Action

    • Action Type List

    • Action Type : Find

    • Action Type : Filter

    • Action Type : Find by Index

    • Action Type : Line Items

    • Action Type : Math



1. What is Array Function?


Array Functions is a premium action in workflow automation specifically designed to handle array data.

This functionality is very useful for complex workflows involving arrays.



2. How to use Action Types?


  • Add the Action - Click the "+" button to add an action. Search for Array Functions or scroll down to the "Actions" tab to select the same.




  • Select Action Type - Post selecting the Array Function action we need to select the Action Type.



 2.1 Action Type : Find

  • To find the matching key-value's in an array of objects and return the object.

  • 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.

  • In the below example we are using Shopify Order Placed Trigger and checking if a product with product id "zGhad23wfadfa" is part of the shopify line items


   Select Shopify → Line Items


  • Select Key-value to find matching object.



  • 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.


  • Enter value to find the match.



  • Add another item - You can also find the matching object with multiple key-value pairs by adding another key-value item.


  • By completing the above steps, you can now use the returned object variables from Array Function as custom values in email, sms, if/else, etc. In the below example, the shopify line items variables are listed in the custom values.




2.2 Action Type : Filter


  • Select the “Filter” action type from the dropdown. This action type will help in filtering the array by matching key-value in an array of objects.


Use case

  • Eg: Filter the array by product group and then send it via Custom Webhook.






  • 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 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.







  • Enter value to find the match.




  • Add another item - You can also find the matching object with multiple key-value pairs by adding another key-value item.


2.3 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.4 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 in Google Sheet (Create Rows - later)

  • To reconstruct the array to match 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.



2.5 Action Type : Math


  • Select the “Math” action type from the dropdown. This action type will help to calculate Sum, Min, Max, Avg by matching key-value 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 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.


💸 [Workflow] Array Functions Premium Action - New Action Types

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.

image
  • 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

image
  • The entered index value will return.

image

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 in Google Sheet (Create Rows - later)

  • To reconstruct the array to match Email Builder Shopping cart structure

image
  • 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

image
  • Enter the custom value in the “Key” input field and select the corresponding value from the value dropdown.

imageimage
  • Add another item - You can also find the matching object with multiple key-value pairs by adding another key value item.

image
  1. Action Type : Math

  • Select the “Math” action type from the dropdown. This action type will help to calculate Sum, Min, Max, Avg by matching key-value in an array of objects.

Use case

  • Eg: To calculate Sub total(line item total), Line Items in cart(count), Total items (qty).

image
  • 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

image
  • Select 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.

image

-

  • Select or deselect from the list of options available.

image


💸 [Workflow] Array Functions Premium Action - New Action Types

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.

image
  • 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

image
  • The entered index value will return.

image

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 in Google Sheet (Create Rows - later)

  • To reconstruct the array to match Email Builder Shopping cart structure

image
  • 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

image
  • Enter the custom value in the “Key” input field and select the corresponding value from the value dropdown.

imageimage
  • Add another item - You can also find the matching object with multiple key-value pairs by adding another key value item.

image
  1. Action Type : Math

  • Select the “Math” action type from the dropdown. This action type will help to calculate Sum, Min, Max, Avg by matching key-value in an array of objects.

Use case

  • Eg: To calculate Sub total(line item total), Line Items in cart(count), Total items (qty).

image
  • 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

image
  • Select 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.

image

-

  • Select or deselect from the list of options available.

image

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.

image
  • 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

image
  • The entered index value will return.

image

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 in Google Sheet (Create Rows - later)

  • To reconstruct the array to match Email Builder Shopping cart structure

image
  • 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

image
  • Enter the custom value in the “Key” input field and select the corresponding value from the value dropdown.

imageimage
  • Add another item - You can also find the matching object with multiple key-value pairs by adding another key value item.

image
  1. Action Type : Math

  • Select the “Math” action type from the dropdown. This action type will help to calculate Sum, Min, Max, Avg by matching key-value in an array of objects.

Use case

  • Eg: To calculate Sub total(line item total), Line Items in cart(count), Total items (qty).

image
  • 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

image
  • Select 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.

image

-

  • Select or deselect from the list of options available.

image
Did this answer your question?
😞
😐
😁