- Prerequisites
- Building an Integration
- Setting Up Authentication
- Setting Up Triggers & Actions
- Publishing Integration
- How To Authenticate Your Application Using The API Key Method
- How to Set-Up the Integration Based on Auth Type Bearer Token
- How To Authenticate Your Application Using OAuth 2.0
- How To Authenticate Your Application Using Basic Auth
- How To Authenticate Your Application Using The JWT Bearer Method
Using Number Formatters in SureTriggers
One of the key features that SureTriggers offers is the ability to format numbers, allowing users to transform numerical data in the desired format.
Whether you need to display currency values, round off decimal places, or convert units, number formatters in SureTriggers can help you.
In this article, we’ll explore the different number formatters available in SureTriggers.
We’ll explain each formatter in detail, provide examples of how to use them, and highlight the benefits they bring to your workflows.
Available Number Formatters in SureTriggers
There are various different number formatters available in SureTriggers that can help you transform numbers.
Let’s understand the formatter in detail.
Format Currency
This formatter is particularly useful when you need to represent numbers in monetary amounts.
By using the “Format Currency” formatter, you can specify the currency symbol, the decimal precision, and whether you want to include commas as thousand separators.
For example, if you have a numeric value of 1500 and you apply the “Format Currency” formatter with the currency symbol set to “$” and decimal precision set to 2, the formatted result would be “$1,500.00”.
Format Number
The Format Number action enables you to change the desired format of numbers by making changes to the decimal signs, and thousand separators if the number is not in your desired format.
For example, in specific locales like French, the decimal separator is represented by a comma (3,01), and the thousands separator is represented by a space (3 255).
So using Format Curreny action, you can help you display the currency values as you prefer!
Math Operations
The Math Operations formatter allows you to perform mathematical calculations on numerical values within your workflows.
Using Math Operations, you can perform common operations like addition, subtraction, multiplication, and division within your workflows.
Imagine you are the owner of a WooCommerce store, and you have a brilliant idea to reward your customers for their loyalty.
Basically, when a customer makes a purchase from your store, you plan to generate a personalized discount code for them.
This code will be sent along with their order confirmation or in a follow-up email, enticing them to return and enjoy a 10% discount on their next purchase.
And the discount should be calculated as 10% of the total value of their current order.
So in this case, you can calculate the 10% of the order value with Math Operation action and use the result while communicating about the discount and generating coupons.
Minor Currency Unit
The Minor Currency Unit formatter is valuable when dealing with fractional currency values. It helps you represent currency amounts in the smallest units, such as cents or pence.
As for USD, the minor currency would be cents.
Let’s take one more example.
If your workflow involves processing monetary transactions and you need to display the amount in cents, you can use the Minor Currency Unit formatter to convert the value accordingly.
Decimal Conversion
In simple words, the Decimal Conversion formatter allows you to add the desired number of 0 after the decimal mark
For example, if you receive inputs in real numbers (numbers without decimal points) format and you need to convert them to decimal for further processing, you can use the Decimal Conversion formatter to perform the conversion seamlessly.
Counter
The Counter formatter action helps you generate numbers in a sequence every time your workflow runs.
To simplify, it can add or subtract from a reference number when the workflow runs.
Imagine you want to gather feedback from 100 individuals using Google Forms.
As a token of appreciation, you’re offering a reward for their participation. Moreover, you want to keep your team in the loop by sharing every single submission on Slack.
To make this process seamless, you can use the Counter action in your workflow. It will keep track of how many times your workflow runs, allowing you to take the appropriate steps once you’ve received a total of 100 entries.
Random Number
The Random Number formatter generates random values within a specified range.
It is handy when you need to generate random data.
For example, if you have a workflow that involves selecting a random winner from a pool of participants, you can employ the Random Number formatter to generate a random number within the range of the participant count.
Spreadsheet Formulas
With Spreadsheet formulas action in SureTriggers, you can use spreadsheet formulas in your workflows.
These formulas provide advanced functionality for handling complex calculations, data transformations, and conditional operations.
SureTriggers supports almost every Google Sheets formula for numeric and date-time values.
Format Phone Number
The Format Phone Number action allows you to display phone numbers in a specific format.
It ensures consistent and standardized representation of phone numbers, including country codes, area codes, and separators.
Let’s say you have set up a workflow to store lead details in your CRM tool.
These details include phone numbers collected from a form.
And to ensure that the phone numbers are consistent and in a standard format, you can utilize the Phone Number formatter.
How to Use Number Formatter Action?
The Number Formatter is available within the Formatter app. You can find it while setting up actions in your workflow.
To use the Number Formatter, simply add the Formatter app as an action in your workflow.
And select Numbers for “What Do You Want to Format?”, once Numbers is selected, you can use any of the available actions to manipulate numeric values.
And the result generated from the Number formatter can be mapped into the next steps as you would normally map data.
We’ve covered the different number formatters in SureTriggers, which can help you make numbers look the way you want them to.
You can use these formatters to show money amounts correctly, round off decimals, and do other helpful things with numbers.
So, go ahead and try using these formatters in your workflows.
And if you ever need assistance, don’t hesitate to contact our support team. We are always ready to help you with any questions or issues you may have.
We don't respond to the article feedback, we use it to improve our support content.