Skip to main content

Workflow Action: Number Formatter

Overview

The Number Formatter in Stack workflows is a versatile tool for handling numeric data. It allows you to convert text to numbers, format numbers, standardize phone numbers, format currency, and generate random numbers.

Action Name

Number Formatter

Action Details

Text to Number

This action converts text representations of numbers into a numeric format. For example, it can transform "$12,345.67" into 12345.67.

Action Configuration

  • Action Name: Customize the name of this action.
  • Action Type: Set as "Text to Number".
  • Select Field: Choose the field containing the text representation of a number.
  • Input Decimal Mark: Specify how the decimal is marked in the input (e.g., a period).

Example Workflow

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

Format Number

Formats a number based on your defined settings, such as decimal places and thousands separators.

Action Configuration

  • Action Name: Customize the name of this action.
  • Action Type: Set as "Format Number".
  • Select Field: Choose the field containing the number.
  • Input Decimal Mark: Define the current decimal mark used in the input number.
  • To Format: Specify the desired output format for the number (e.g., period).

Example Workflow

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

Format Phone Number

Standardize a phone number into your desired format, such as (123) 456-7890.

Action Configuration

  • Action Name: Customize the name of this action.
  • Action Type: Set as "Format Phone Number".
  • Select Field: Choose the field containing the phone number.
  • To Format: Specify the desired format for the phone number (e.g., E.164).
  • Phone Number Country Code: Specify the country for the phone number.

Example Workflow

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

Format Currency

Formats a numeric value as currency, considering locale-specific settings.

Action Configuration

  • Action Name: Customize the name of this action.
  • Action Type: Set as "Format Currency".
  • Select Field: Choose the field containing the numeric value.
  • Currency: Specify the currency type (e.g., USD, EUR).
  • Currency Locale: Define the locale format for the currency (e.g., en-US).

Example Workflow

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

Random Number

Generates a random number within a specified range.

Action Configuration

  • Action Name: Customize the name of this action.
  • Action Type: Set as "Random Number".
  • Lower Range: Define the minimum value of the generated random number.
  • Upper Range: Define the maximum value of the generated random number.
  • Decimal Points: Specify how many decimal points are allowed (optional).

Example Workflow

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