# Workflow Action - Array Formatter

> The action Array Formatter allow users to perform operations on arrays (lists of data). With these powerful actions, users can manipulate, filter, and…

- Source: https://docs.ghlcustomercare.com/docs/workflows/internal-tools-workflow-actions/workflow-action-array-formatter
- Section: Workflows / Internal Tools Workflow Actions
- Reading time: 5 min
- Images: 17, each explained below

---
The action Array Formatter allow users to perform operations on arrays (lists of data). With these powerful actions, users can manipulate, filter, and extract information from data arrays to automate tasks more efficiently.

---

**TABLE OF CONTENTS**

-   [What are Array Functions?](#what-is-array-formatter)
-   [Key Benefits of Array Functions](#key-benefits-of-array-formatter)
-   [How to Set Up Array Functions](#how-to-set-up-array-formatter)
    -   [Detailed Explanation of Array Functions](#detailed-explanation-of-array-functions)
    -   [Find](#find)
    -   [Find by Index](#find-by-index)
    -   [Filter](#filter)
    -   [Line Items](#line-items)
    -   [Math](#math)
-   [Frequently Asked Questions](#frequently-asked-questions)
-   [Related Articles](#related-articles)
-   [Next Steps](#next-steps)

---

# **What is Array Formatter?**

Array Functions are a set of workflow actions in GHL Customer Care designed to manage and manipulate arrays (lists of data) within automation workflows. Arrays appear in workflows when dealing with lists of objects, such as order line items or customer attributes, and Array Functions enable users to extract, filter, or calculate data efficiently. These functions are particularly valuable for businesses that want to handle basic data processing exclusively in Workflows, rather than having to export data to a 3rd party service more manipulation or analysis.

Array Formatter is now free to use as a standard workflow execution billed at **$0**. The workflow behavior stays the same, but you no longer incur premium execution charges when using this action.

**Important:**

-   Array Formatter is no longer treated as a Premium Action
-   Workflow behavior remains unchanged
-   You can continue using it after a webhook or any workflow step that outputs an array

---

## **Key Benefits of Array Formatter**

Using Array Functions in GHL Customer Care workflows provides numerous advantages for automation, data processing, and task efficiency. Below are the primary benefits:

-   **Enhanced Workflow Automation:** Automate tasks that require filtering, sorting, or calculating data without sending the data to an external 3rd party service.
-   **Improved Decision Making:** Extract meaningful insights from datasets in real-time.
-   **Reduced Manual Errors:** Automate complex calculations and data manipulations.
-   **Customizable Actions:** Tailor workflows to unique business needs with flexible array operations.

---

## **How to Set Up Array Formatter**

The action panel now makes Array Formatter easier to understand before you save the action. When choosing an action type, you can review clearer option details directly in the dropdown and configuration panel.

The updated UI includes:

-   action type descriptions
-   muted icons for action types
-   return type visibility
-   output preview or return summary messaging

This helps you understand what each option is expected to return before saving the action.

Follow these steps to set up and use Array Functions in a workflow:

**Step 1****: Access Workflow Builder**. Open the GHL Customer Care application, navigate to the Automation tab, and create or select a workflow. 

![How to Set Up Array Formatter (image 1 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040473379/original/BNeYKRSqIiAKoO2etWq1iFcGanZGh-DEXg.png)

**How to Set Up Array Formatter (image 1 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 1: Access Workflow Builder. Open the GHL Customer Care application, navigate to the Automation tab, and create or select a workflow. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Step 2: Add Array Function Action. Click “Add Action” and select “Array Function” under the Premium Actions section.
- What to choose: Step 1: Access Workflow Builder. Open the GHL Customer Care application, navigate to the Automation tab, and create or select a workflow.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Step 2: Add Array Function Action. Click “Add Action” and select “Array Function” under the Premium Actions section.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

**Step 2****: Add Array Function Action**. Click “Add Action” and select “Array Function” under the Premium Actions section. 

![How to Set Up Array Formatter (image 2 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040473375/original/0jHYbd1q6WtZWX1mZca3xyn9BEJEUgoo7Q.png)

**How to Set Up Array Formatter (image 2 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 2: Add Array Function Action. Click “Add Action” and select “Array Function” under the Premium Actions section. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Step 3: Choose Function Type. Select the desired array function from the options: Find, Filter, Find by Index, Line Items, or Math.
- What to choose: Step 2: Add Array Function Action. Click “Add Action” and select “Array Function” under the Premium Actions section.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Step 3: Choose Function Type. Select the desired array function from the options: Find, Filter, Find by Index, Line Items, or Math.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

**Step 3****: Choose Function Type**. Select the desired array function from the options: Find, Filter, Find by Index, Line Items, or Math.

![How to Set Up Array Formatter (image 3 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040473392/original/-VA72O-j_YI5szbXcqDpIRm8jtKJCz_ALA.png)

**How to Set Up Array Formatter (image 3 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 3: Choose Function Type. Select the desired array function from the options: Find, Filter, Find by Index, Line Items, or Math. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Step 4: Configure Inputs. Specify the input array. Define keys, values, or criteria based on the selected function type.
- What to fill in: Step 3: Choose Function Type. Select the desired array function from the options: Find, Filter, Find by Index, Line Items, or Math.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Step 4: Configure Inputs. Specify the input array. Define keys, values, or criteria based on the selected function type.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

**Step 4: Configure Inputs**. Specify the input array. Define keys, values, or criteria based on the selected function type.

![How to Set Up Array Formatter (image 4 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040473413/original/mgFN2ZZM68q4RzHXmgQlO5j5xOhCdWh-og.png)

**How to Set Up Array Formatter (image 4 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 4: Configure Inputs. Specify the input array. Define keys, values, or criteria based on the selected function type. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Step 5: Save and Test. Save the workflow and test the action to ensure it’s working as intended.
- What to fill in: Step 4: Configure Inputs. Specify the input array. Define keys, values, or criteria based on the selected function type.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Step 5: Save and Test. Save the workflow and test the action to ensure it’s working as intended.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

**Step 5: Save and Test.** Save the workflow and test the action to ensure it’s working as intended.

![How to Set Up Array Formatter (image 5 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040473426/original/ESwsr1PF1dntsi5CpxqRcBRH0JK1u4j79w.png)

**How to Set Up Array Formatter (image 5 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 5: Save and Test. Save the workflow and test the action to ensure it’s working as intended. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Step 6: Use The Value. When the action is working it will create a variable that you can reference in other actions.
- How to confirm: Step 5: Save and Test. Save the workflow and test the action to ensure it’s working as intended.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Step 6: Use The Value. When the action is working it will create a variable that you can reference in other actions.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

**Step 6: Use The Value.** When the action is working it will create a variable that you can reference in other actions.

![How to Set Up Array Formatter (image 6 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040480458/original/1eTghHjhNXhJv7nQaSMqii0CKYI8rUpswg.png)

**How to Set Up Array Formatter (image 6 of 17)**

This screenshot appears in the "How to Set Up Array Formatter" section of "Workflow Action - Array Formatter". The text alongside this image reads: Step 6: Use The Value. When the action is working it will create a variable that you can reference in other actions. This part of the guide covers 3 fields, listed below. Immediately after, the guide continues: Each Array Function type is tailored to perform specific operations on array data. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger and Custom Webhook action response data.
- What this covers: Step 6: Use The Value. When the action is working it will create a variable that you can reference in other actions.
- Fields: action type descriptions, muted icons for action types, return type visibility
- Controls: Step 1, : Access Workflow Builder, Step 2, : Add Array Function Action, Step 3, : Choose Function Type, Step 4: Configure Inputs, Step 5: Save and Test., Step 6: Use The Value.
- Next: Each Array Function type is tailored to perform specific operations on array data. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger and Custom Webhook action response data.

Full procedure:

1. action type descriptions
2. muted icons for action types
3. return type visibility
4. output preview or return summary messaging

---

## **Detailed Explanation of Array Functions**

Each Array Function type is tailored to perform specific operations on array data. The list of available array data is collected from Shopify Triggers, Inbound Webhook Trigger and Custom Webhook action response data.

Below is a breakdown of the available functions:

### **Find**

The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.

![Find (image 7 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040479747/original/37cstWkFwrxGERq67agrZA-Q6Cb5R_LRJw.png)

**Find (image 7 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: For example, using Shopify Order Placed Trigger and checking if a product with product id "zGhad23wfadfa" is part of the Shopify line items. Step 1: Select Action Type Find Step 2: Select Shopify > Line Items Step 3: Pick the Key and….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: For example, using Shopify Order Placed Trigger and checking if a product with product id "zGhad23wfadfa" is part of the Shopify line items. Step 1: Select Action Type Find Step 2: Select Shopify > Line Items Step 3: Pick the Key and input the Value to match. Step 4: Review the available Line Item Keys. Step 5: In this example, select the "id" Key and paste in the specific product id as the Value.

<table style="width: 100%"><tbody><tr><td dir="ltr" style="width: 50.0000%">For example, using Shopify Order Placed Trigger and checking if a product with product id "zGhad23wfadfa" is part of the Shopify line items.<br><u dir="ltr"><strong>Step 1</strong>: Select Action Type Find</u></td><td style="width: 50.0000%"><p>
![Find (image 8 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040480609/original/X7iUYaj_SehCrghF7dD29q57bQqW8WEG9g.png)

**Find (image 8 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
</p></td></tr><tr><td dir="ltr" style="width: 50.0000%"><u dir="ltr"><strong>Step 2</strong>: Select Shopify &gt; Line Items</u></td><td style="width: 50.0000%"><p>
![Find (image 9 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040480684/original/Stb1nbdogQM3wJV8nZqN59nBDPERRs1mxQ.png)

**Find (image 9 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
</p></td></tr><tr><td dir="ltr" style="width: 50.0000%"><u><strong>Step 3</strong>: Pick the Key and input the Value to match.</u></td><td style="width: 50.0000%"><p>
![Find (image 10 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040480731/original/bUhLbJ5DBfQ2J2DMuUc1I8DALkZVO_zqXA.png)

**Find (image 10 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
</p></td></tr><tr><td dir="ltr" style="width: 50.0000%"><u><strong>Step 4</strong>: Review the available Line Item Keys.</u></td><td style="width: 50.0000%"><p>
![Find (image 11 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040481092/original/3CZd4JMwZhu0p4W88wigwYey4s7gGkatag.png)

**Find (image 11 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
</p></td></tr><tr><td dir="ltr" style="width: 50.0000%"><u><strong>Step 5</strong>: In this example, select the "id" Key and paste in the specific product id as the Value.</u></td><td style="width: 50.0000%"><p>
![Find (image 12 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040481121/original/MRD8SA6WoV3VoYgFExIJcG6_nIl4Y-ufVg.png)

**Find (image 12 of 17)**

This screenshot appears in the "Find" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches. Immediately after, the guide continues: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request….
- What this covers: The Find action will locate a specific object in an array by matching a key-value pair. For example, Finding whether a specific product, such as "Laptop," exists in a list of purchased items. If a match exists, it will be returned. Find will return only one object, the first object that matches.
- Controls: Step 1, Step 2, Step 3, Step 4, Step 5
- Next: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
</p></td></tr></tbody></table>

### **Find by Index**

The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.

![Find by Index (image 13 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040479871/original/B5KIJaU-pso0h87O8wcSVDS9iOfpNOorWg.png)

**Find by Index (image 13 of 17)**

This screenshot appears in the "Find by Index" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third…. Immediately after, the guide continues: The Filter Action will return an array of all the objects that match a given filter (or set of filters). For example, all of the objects that have the color "blue" or all of the objects in the category "home".
- What this covers: The Find by Index Action will return one item based on it's array position. The array always starts at zero (0). So if there are three (3) items in the array they will be numbered like this: (0) Apple, (1) Banana, (2) Cherry. A request for the item at index position two (2) will return the third item in the list, in this case Cherry.
- Next: The Filter Action will return an array of all the objects that match a given filter (or set of filters). For example, all of the objects that have the color "blue" or all of the objects in the category "home".

### **Filter**

The Filter Action will return an array of all the objects that match a given filter (or set of filters). For example, all of the objects that have the color "blue" or all of the objects in the category "home".

![Filter (image 14 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040479946/original/7FpotjptUCNI2FoGye1pl0iO-aoe-2azng.png)

**Filter (image 14 of 17)**

This screenshot appears in the "Filter" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Filter Action will return an array of all the objects that match a given filter (or set of filters). For example, all of the objects that have the color "blue" or all of the objects in the category "home". Immediately after, the guide continues: For example, you can filter an array down to only a certain person. By setting the Key to "id" and the Value to the dynamic {{user.name}} you could get all of their orders.
- What this covers: The Filter Action will return an array of all the objects that match a given filter (or set of filters). For example, all of the objects that have the color "blue" or all of the objects in the category "home".
- Next: For example, you can filter an array down to only a certain person. By setting the Key to "id" and the Value to the dynamic {{user.name}} you could get all of their orders.

For example, you can filter an array down to only a certain person. By setting the Key to "id" and the Value to the dynamic {{user.name}} you could get all of their orders.

![Filter (image 15 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040481226/original/OdnHyvfid1bBaAzNfMsSMi0xAhI1e2rUyQ.png)

**Filter (image 15 of 17)**

This screenshot appears in the "Filter" section of "Workflow Action - Array Formatter". The text alongside this image reads: For example, you can filter an array down to only a certain person. By setting the Key to "id" and the Value to the dynamic {{user.name}} you could get all of their orders. Immediately after, the guide continues: The Line Items action type allows you to rebuild/reconstruct arrays to fit a target action, such as a custom webook, storing in Google Sheets, or matching Email Builder shopping cart structure. You can customize the key-value pairs in….
- What this covers: For example, you can filter an array down to only a certain person. By setting the Key to "id" and the Value to the dynamic {{user.name}} you could get all of their orders.
- Next: The Line Items action type allows you to rebuild/reconstruct arrays to fit a target action, such as a custom webook, storing in Google Sheets, or matching Email Builder shopping cart structure. You can customize the key-value pairs in each item. This takes in one array and outputs the same data in a different array you specified.

### **Line Items**

The Line Items action type allows you to rebuild/reconstruct arrays to fit a target action, such as a custom webook, storing in Google Sheets, or matching Email Builder shopping cart structure. You can customize the key-value pairs in each item. This takes in one array and outputs the same data in a different array you specified.

### 

![Line Items (image 16 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040479996/original/GGHxWVTGin31P72-wosdPcgYqAGOCioVGA.png)

**Line Items (image 16 of 17)**

This screenshot appears in the "Line Items" section of "Workflow Action - Array Formatter". The text alongside this image reads: The Line Items action type allows you to rebuild/reconstruct arrays to fit a target action, such as a custom webook, storing in Google Sheets, or matching Email Builder shopping cart structure. You can customize the key-value pairs in each item. This takes in one array and outputs the same data in…. Immediately after, the guide continues: The Math Functions Action has several options like Sum or Avg to be performed on the numbers in an array. For example, all of the prices can be Summed together to get the total order value. The result of the math will be returned. The….
- What to fill in: The Line Items action type allows you to rebuild/reconstruct arrays to fit a target action, such as a custom webook, storing in Google Sheets, or matching Email Builder shopping cart structure. You can customize the key-value pairs in each item. This takes in one array and outputs the same data in a different array you specified.
- Next: The Math Functions Action has several options like Sum or Avg to be performed on the numbers in an array. For example, all of the prices can be Summed together to get the total order value. The result of the math will be returned. The Math operations are:

### **Math**

The Math Functions Action has several options like Sum or Avg to be performed on the numbers in an array. For example, all of the prices can be Summed together to get the total order value. The result of the math will be returned. The Math operations are:

-   Sum: add all of the values, return the total.
-   Min: find the smallest value, return it.
-   Max: find the largest value, return it.
-   Average: add all of the values and divide by the number of values, return the mean.
-   Count: count the total number of values, return it.

![Math (image 17 of 17)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155040480098/original/JZemO149ziEtzyYNP9OH3279OQ7mJ3LpCw.png)

**Math (image 17 of 17)**

This screenshot appears in the "Math" section of "Workflow Action - Array Formatter". The text alongside this image reads: Sum: add all of the values, return the total. Min: find the smallest value, return it. Max: find the largest value, return it. Average: add all of the values and divide by the number of values, return the mean. Count: count the total number of values, return it. Immediately after, the guide continues: Q: What type of data can be used with Array Functions?
- What this covers: Sum: add all of the values, return the total. Min: find the smallest value, return it. Max: find the largest value, return it. Average: add all of the values and divide by the number of values, return the mean. Count: count the total number of values, return it.
- Next: Q: What type of data can be used with Array Functions?

Full procedure:

1. Sum: add all of the values, return the total.
2. Min: find the smallest value, return it.
3. Max: find the largest value, return it.
4. Average: add all of the values and divide by the number of values, return the mean.
5. Count: count the total number of values, return it.

---

## **Frequently Asked Questions**

**Q: What type of data can be used with Array Functions?**

A: Array Functions work with arrays (lists) of objects or numbers. Arrays often come from triggers like form submissions, order line items, or API responses.

**Q: Are Array Functions a premium feature?** 

A: No, Array Formatter is no longer part of GHL Customer Care’s premium workflow actions and it is now free to use.

**Q: Can Array Functions handle nested arrays?** 

A: No, Array Functions are currently designed to handle one-dimensional (flat) arrays. Additional processing for nested data requires custom solutions.

**Q: Can I use multiple Array Functions in the same workflow?**

A: Absolutely. You can chain Array Functions together to perform complex operations.

**Q: How do I debug issues with Array Functions?**

A: Use the “Test Workflow” feature in the builder to view outputs and ensure proper configuration.

---

## **Related Articles**

-   [Custom Code in Workflows](https://docs.ghlcustomercare.com/docs/workflows/workflow-builder/workflow-action-custom-code)
-   [Math Operations in Workflows](https://docs.ghlcustomercare.com/docs/workflows/workflow-builder/workflow-action-math-operation)
-   [How to Use If/Else Conditions in Workflows](https://docs.ghlcustomercare.com/docs/memberships-and-communities/membership-courses-sites/how-do-first-time-users-set-login-password-request-forgotten-password-for-their)

---

## **Next Steps**

-   Review your workflows to identify areas where Array Functions can automate processes.
-   Explore additional premium actions, such as Custom Code, for advanced automation needs.
-   Ensure all users managing workflows are trained on Array Functions for optimal utilization.

---

Documentation for GHL Customer Care. Support: support@ghlcustomercare.com