# Workflow Action - Number Formatter

> TABLE OF CONTENTS Overview Action Name Action Description Action Details Example Overview The Number Formatter workflow action is used to format and…

- Source: https://docs.ghlcustomercare.com/docs/workflows/workflow-actions/workflow-action-number-formatter
- Section: Workflows / Workflow Actions
- Reading time: 2 min
- Images: 5, each explained below
- Modified on Sat, 7 Sep, 2024 at 7:15 AM

---
**TABLE OF CONTENTS**

-   [Overview](#overview)
-   [Action Name](#action-name)
-   Action Description
-   [Action Details](#action-details)
-   [Example](#Example)

## Overview

The **Number Formatter** workflow action is used to format and generate numeric fields. It includes several functionalities like converting text to numbers, formatting numbers, formatting phone numbers, formatting currency, and generating random numbers.

## Action Name

**Number Formatter**

## Action Details

### Text to Number

Converts text representations of numbers into numeric format. For example, "$12,345.67" to 12345.67.

![Text to Number (image 1 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155032444844/original/gQMRG6tJfZ6hZNRMhH63SfFLy1uiA5aOHw.png)

**Text to Number (image 1 of 5)**

This screenshot appears in the "Text to Number" section of "Workflow Action - Number Formatter". The text alongside this image reads: Converts text representations of numbers into numeric format. For example, "$12,345.67" to 12345.67. Immediately after, the guide continues: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Text to Number. Yes Select Field Choose the field containing the text representation of a number. Yes….
- What this covers: Converts text representations of numbers into numeric format. For example, "$12,345.67" to 12345.67.
- Next: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Text to Number. Yes Select Field Choose the field containing the text representation of a number. Yes Input Decimal Mark Specifies how the decimal is marked in the input (e.g., period). Yes

### Action Details:

<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="width: 0px"><colgroup><col width="100"><col width="506"><col width="119"></colgroup><tbody><tr><td style="vertical-align: bottom; text-align: center">Field</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Description</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Mandatory</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Name</td><td style="vertical-align: bottom; white-space: normal">The name of the action, which can be customized.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Type</td><td style="vertical-align: bottom; white-space: normal">Defines the action, set as Text to Number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Select Field</td><td style="vertical-align: bottom; white-space: normal">Choose the field containing the text representation of a number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Input Decimal Mark</td><td style="vertical-align: bottom; white-space: normal">Specifies how the decimal is marked in the input (e.g., period).</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr></tbody></table>

### Example Workflow Configuration:

-   **Trigger:** Form Submitted
-   **Action:** Convert text to number to process payment data accurately.

\----------------------------------------------------------------------------------------------------------------------

### Format Number

Formats a number according to the defined settings, such as decimal places and thousands separators.

![Format Number (image 2 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155032444854/original/dnFaP_6cfkINQQDk-mw24WbLN76-c3SPhg.png)

**Format Number (image 2 of 5)**

This screenshot appears in the "Format Number" section of "Workflow Action - Number Formatter". The text alongside this image reads: Formats a number according to the defined settings, such as decimal places and thousands separators. Immediately after, the guide continues: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Number. Yes Select Field Choose the field containing the number. Yes Input Decimal Mark Defines the….
- What this covers: Formats a number according to the defined settings, such as decimal places and thousands separators.
- Next: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Number. Yes Select Field Choose the field containing the number. Yes Input Decimal Mark Defines the current decimal mark used in the input number. Yes To Format The desired output format for the number (e.g., period). Yes

### Action Details

<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="width: 0px"><colgroup><col width="100"><col width="506"><col width="119"></colgroup><tbody><tr><td style="vertical-align: bottom; text-align: center">Field</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Description</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Mandatory</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Name</td><td style="vertical-align: bottom; white-space: normal">The name of the action, which can be customized.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Type</td><td style="vertical-align: bottom; white-space: normal">Defines the action, set as Format Number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Select Field</td><td style="vertical-align: bottom; white-space: normal">Choose the field containing the number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Input Decimal Mark</td><td style="vertical-align: bottom; white-space: normal">Defines the current decimal mark used in the input number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">To Format</td><td style="vertical-align: bottom; white-space: normal">The desired output format for the number (e.g., period).</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr></tbody></table>

### Example Workflow Configuration:

-   **Trigger:** Trigger link clicked
-   **Action:** Format number for displaying statistical data in messages.

\----------------------------------------------------------------------------------------------------------------------

### Format Phone Number

Standardises a phone number into the desired format (e.g., (123) 456-7890).

![Format Phone Number (image 3 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155032444859/original/419_JP_zpjRBHacVlD2xJiT6EGUaYHhR7A.png)

**Format Phone Number (image 3 of 5)**

This screenshot appears in the "Format Phone Number" section of "Workflow Action - Number Formatter". The text alongside this image reads: Standardises a phone number into the desired format (e.g., (123) 456-7890). Immediately after, the guide continues: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Phone Number. Yes Select Field Choose the field containing the phone number. Yes To Format The….
- What this covers: Standardises a phone number into the desired format (e.g., (123) 456-7890).
- Next: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Phone Number. Yes Select Field Choose the field containing the phone number. Yes To Format The desired format for the phone number (e.g., E.164). Yes Phone Number Country Code Specifies the country for the phone number. Yes

### Action Details:

<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="width: 0px"><colgroup><col width="100"><col width="506"><col width="119"></colgroup><tbody><tr><td style="vertical-align: bottom; text-align: center">Field</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Description</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Mandatory</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Name</td><td style="vertical-align: bottom; white-space: normal">The name of the action, which can be customized.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Type</td><td style="vertical-align: bottom; white-space: normal">Defines the action, set as Format Phone Number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Select Field</td><td style="vertical-align: bottom; white-space: normal">Choose the field containing the phone number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">To Format</td><td style="vertical-align: bottom; white-space: normal">The desired format for the phone number (e.g., E.164).</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Phone Number Country Code</td><td style="vertical-align: bottom; white-space: normal">Specifies the country for the phone number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr></tbody></table>

### Example Workflow Configuration:

-   **Trigger:** Appointment Booked
-   **Action:** Format the contact's phone number for outbound calls.

\----------------------------------------------------------------------------------------------------------------------

### Format Currency

Formats a numeric value as currency, taking into account locale-specific settings.

![Format Currency (image 4 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155032444872/original/pH52nzLK7Onyn_kOPmXka47rSrGcJGpx8w.png)

**Format Currency (image 4 of 5)**

This screenshot appears in the "Format Currency" section of "Workflow Action - Number Formatter". The text alongside this image reads: Formats a numeric value as currency, taking into account locale-specific settings. Immediately after, the guide continues: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Currency. Yes Select Field Choose the field containing the numeric value. Yes Currency The currency….
- What this covers: Formats a numeric value as currency, taking into account locale-specific settings.
- Next: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Format Currency. Yes Select Field Choose the field containing the numeric value. Yes Currency The currency type (e.g., USD, EUR). Yes Currency Locale The locale format for the currency (e.g., en-US). Yes

### Action Details

<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="width: 0px"><colgroup><col width="100"><col width="506"><col width="119"></colgroup><tbody><tr><td style="vertical-align: bottom; text-align: center">Field</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Description</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Mandatory</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Name</td><td style="vertical-align: bottom; white-space: normal">The name of the action, which can be customized.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Type</td><td style="vertical-align: bottom; white-space: normal">Defines the action, set as Format Currency.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Select Field</td><td style="vertical-align: bottom; white-space: normal">Choose the field containing the numeric value.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Currency</td><td style="vertical-align: bottom; white-space: normal">The currency type (e.g., USD, EUR).</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Currency Locale</td><td style="vertical-align: bottom; white-space: normal">The locale format for the currency (e.g., en-US).</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr></tbody></table>

### Example Workflow Configuration:

-   **Trigger:** Payment Received
-   **Action:** Format currency for generating accurate receipts.

\----------------------------------------------------------------------------------------------------------------------

### Random Number

Generates a random number within a specified range.

![Random Number (image 5 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155032444877/original/bq9cnzChFLQ4_z0uujoqQsN8iSqWpJtNEQ.png)

**Random Number (image 5 of 5)**

This screenshot appears in the "Random Number" section of "Workflow Action - Number Formatter". The text alongside this image reads: Generates a random number within a specified range. Immediately after, the guide continues: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Random Number. Yes Lower Range The minimum value of the generated random number. Yes Upper Range The….
- What this covers: Generates a random number within a specified range.
- Next: Field Description Mandatory Action Name The name of the action, which can be customized. Yes Action Type Defines the action, set as Random Number. Yes Lower Range The minimum value of the generated random number. Yes Upper Range The maximum value of the generated random number. Yes Decimal Points Defines how many decimal points are allowed. No

### Action Details

<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="width: 0px"><colgroup><col width="100"><col width="506"><col width="119"></colgroup><tbody><tr><td style="vertical-align: bottom; text-align: center">Field</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Description</td><td style="vertical-align: bottom; font-weight: normal; text-align: center">Mandatory</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Name</td><td style="vertical-align: bottom; white-space: normal">The name of the action, which can be customized.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Action Type</td><td style="vertical-align: bottom; white-space: normal">Defines the action, set as Random Number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Lower Range</td><td style="vertical-align: bottom; white-space: normal">The minimum value of the generated random number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Upper Range</td><td style="vertical-align: bottom; white-space: normal">The maximum value of the generated random number.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">Yes</td></tr><tr><td style="vertical-align: bottom; white-space: normal">Decimal Points</td><td style="vertical-align: bottom; white-space: normal">Defines how many decimal points are allowed.</td><td style="vertical-align: bottom; font-weight: normal; white-space: normal">No</td></tr></tbody></table>

### Example Workflow Configuration:

-   **Trigger:** Email Opened
-   **Action:** Generate a random number for A/B testing purposes.

---

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