Help Center

String Function: FORMAT_NUMBER

Sarah Bacchus
Sarah Bacchus
  • Updated

 

Question

How can I use the String Function "FORMAT_NUMBER" on my feed? 

Answer

There are a few different ways a user can implement the "FORMAT_NUMBER" function within a feed. One thing to note is all FORMAT_NUMBER functions will round up to the nearest decimal place based on the type of query selected. 

 

FORMAT_NUMBER(:0.0){{

Example: The below rule was created to optimize titles for a jewelry feed and round the diamond carat value to the first decimal place. 

Title in the import:

Leah - 1.71 Emerald Peach Sapphire Engagement Ring

Title after the FORMAT_NUMBER(:0.0){{ string function applied:

1.7ct Emerald Peach Sapphire Engagement Ring Solitaire Platinum


How did we apply this? The below example shows how this rule was applied on the feed level using a combination of the String Functions, static values (such as ct to reference the carat), and product attribute fields based on the jewelry item such as color, style, metal type, etc. 

 

Here is a gif on how we suggest applying this on the feed level for this specific use case scenario: 

Animation.gif

 

See below for an image of the rule once saved. The highlighted portions are the string function FORMAT_NUMBER(:0.0){{ being used within the rule to apply to the [P]. [Carat (In numbers)] product attribute field and the }} bracket to close the function and continue to concatenate the rule as expected resulting in the end value shown above. 

 

 

FORMAT_NUMBER(:0%){{

Example: The below rule was created to update the price to a percent on the feed. 

FormatNumberPrice.gif

See below for a screenshot of the rule once saved and applied:

 

See below for the value before the string function is applied in the yellow column and see the value in the green column for the result after the rule has been applied to the feed.  Item Price $ to %.png

 

FORMAT_NUMBER(:0,0){{

Example: The below rule was created to update the price to 0,0 on the feed. 

FormatNumberPrice00.gif

See below for a screenshot of the rule once saved and applied:

 

See below for the value before the string function is applied in the yellow column and see the value in the green column for the result after the rule has been applied to the feed.  

 

Item Price $ to 0.0.png

 

FORMAT_NUMBER(:0.000){{

Example: The below rule was created to update the price to 0.000 on the feed. 

FormatNumberPrice00.gif

See below for a screenshot of the rule once saved and applied:

See below for the value before the string function is applied in the yellow column and see the value in the green column for the result after the rule has been applied to the feed.  

 

Item Price $ to 0.000.png

 

FORMAT_NUMBER(:00.00){{

Example: The below rule was created to update the price to 00.00 on the feed. 

FormatNumberPrice00.00.gif

See below for a screenshot of the rule once saved and applied:

 

See below for the value before the string function is applied in the yellow column and see the value in the green column for the result after the rule has been applied to the feed.  

00.00.png

See additional help articles for further:

:dizzy:  Using String Functions in Feed Rules

 

Need further support in setting up a string function? Contact our support team and please provide 3-5 example sku's as well as the expected before and after values for our team to best assist you further. 

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.