How to access to the functions list from the interface? In a channel > "Attributes Matching" > from each channel field > "How to fill in this value? " tooltip > "Need function?" link

1. Text functions

  • UPPER: Turn all the characters into capitals

Syntax: UPPER($text_field)

Example: I want all the characters sent to the channel field "title" to be in capital letters.

  • LOWER: Turn all the characters into lower-case

Syntax: LOWER($text_field)

Example: I want all the characters sent to the channel field "title" to be in lower-case.

function-lower2.png

  • UPPERWORD: Capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter

Syntax: UPPERWORD($text_field)

Example: I want the first letter of each word to be a capital, in the channel field "title".

function-upperword2.png

  • UPPERSENTENCE: Capitalizes the first letter of each sentence

Syntax: UPPERSENTENCE($text_field)

Example: I want each sentence to begin with a capital, in the channel field "title".

function-uppersentence2.png

  • TRUNC: Limit the number of characters

Syntax: TRUNC($text_field,number of characters)

Example: I want to limit my description to 2,000 characters.

function-trunc.png

  • SMARTTRUNC: Limit the number of characters without cutting off the last word

Syntax: SMARTTRUNC($text_field,number of characters)

Example: I want to limit my description to 2,000 characters without cutting off the last word.

function-smarttrunc.png

  • STRIPHTML: Remove the HTML tag

Syntax: STRIPHTML($html_text_field)

Example: I want to remove the html tags from my description.

function-striphtml.png

  • URLENCODE: Encode the values to send in a URL

Syntax: URLENCODE($text_field)

Example: I want to add the title of my products in the tracking of my URL products.

function-urlencode2.png

2. Mathematical functions

  • Round: Round a number up/down and define the number of decimals

Syntax: ROUND(number to round up/down,number of figures desired after the decimal point)

Round up/down the number, to the nearest tenth, hundredth...of a decimal number, cutting down to the stated rank then:

  • if the following number is 5, 6, 7, 8 or 9, you increase the last figure of the cut number by 1.
  • if the following number is 0, 1, 2, 3 or 4, you keep the cut number.

To round up to a whole number, mark "0" as "the number of figures desired after the decimal point" or mark ROUND(numbertoround).

Example:

  • To round a price to two figures after the decimal point: ROUND($field_price,2) > If my price is "14.1576" in my product catalogue, it becomes "14.16".

function-round.png

  • To remove decimals of quantity values: ROUND($field_quantity,0) or ROUND($field_quantity) > If my quantity is "4.000" in my product catalogue, it becomes "4".

function-round-sansparametre.png

  • ROUNDUP: To round up to the nearest whole number

Syntax: ROUNDUP(number to round up to the nearest whole number)

Example: I want to round my price up to the nearest whole number:

function-roundup.png

  • ROUNDDOWN: To round down to the nearest whole number:

Syntax: ROUNDDOWN(number to round down to the nearest whole number)

Example: I want to round my price down to the nearest whole number:

function-rounddown.png

  • CALC: Perform a calculation

  • Divide: CALC(number1/number2)
  • Multiply: CALC(number1*number2)
  • Addition: CALC(number1+number2)
  • Subtraction: CALC(number1-number2)

"number1" and "number2" can be replaced by "$my_field"

With the assistance of brackets, any calculation can be performed. The function performs the calculations in order of priority.

Example: I want to calculate the reduction percentage of my reduced products.

function-calc1.png

I want to increase my sales price by 10%, round it up to the nearest whole number, and subtract 10 cents.

function-calc4.png

I want to reduce my sales price by 15% and add my shipping costs increased by 5%.

function-calc3.png

  • CURRENCYCONV: Convert a price in another currency

Syntax: CURRENCYCONV(price,iso_code)

Example: I want to convert a price into GBP.

function-currencyconv.png

Conversion rates are based on the European Central Bank (ECB) and are updated once a day.

3. Concatenate several functions

Combine as many functions as you like whilst playing with the brackets!

Example: I want to increase my sale price by 10% and round the result by two figures after the decimal point

Example: I want to limit my description to 2,000 characters and write the text in capitals.

function-truncupper.png

Example: I want to increase my sales price by 10% and convert it into euros.

function-currencyconvcalc.png

Example: The text of my descriptions is in upper-case letters. I want the first letter of each phrase to be an capital letter, whereas all the other letters will be lowercase letters.

capture-decran-2017-07-27-a-105135.png

Channels / Attributes Matching / Functions

How to access to the functions list from the interface? In a channel > "Attributes Matching" > from each channel field > "How to fill in this value? " tooltip > "Need function?" link

1. Text functions

  • UPPER: Turn all the characters into capitals

Syntax: UPPER($text_field)

Example: I want all the characters sent to the channel field "title" to be in capital letters.

  • LOWER: Turn all the characters into lower-case

Syntax: LOWER($text_field)

Example: I want all the characters sent to the channel field "title" to be in lower-case.

function-lower2.png

  • UPPERWORD: Capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter

Syntax: UPPERWORD($text_field)

Example: I want the first letter of each word to be a capital, in the channel field "title".

function-upperword2.png

  • UPPERSENTENCE: Capitalizes the first letter of each sentence

Syntax: UPPERSENTENCE($text_field)

Example: I want each sentence to begin with a capital, in the channel field "title".

function-uppersentence2.png

  • TRUNC: Limit the number of characters

Syntax: TRUNC($text_field,number of characters)

Example: I want to limit my description to 2,000 characters.

function-trunc.png

  • SMARTTRUNC: Limit the number of characters without cutting off the last word

Syntax: SMARTTRUNC($text_field,number of characters)

Example: I want to limit my description to 2,000 characters without cutting off the last word.

function-smarttrunc.png

  • STRIPHTML: Remove the HTML tag

Syntax: STRIPHTML($html_text_field)

Example: I want to remove the html tags from my description.

function-striphtml.png

  • URLENCODE: Encode the values to send in a URL

Syntax: URLENCODE($text_field)

Example: I want to add the title of my products in the tracking of my URL products.

function-urlencode2.png

2. Mathematical functions

  • Round: Round a number up/down and define the number of decimals

Syntax: ROUND(number to round up/down,number of figures desired after the decimal point)

Round up/down the number, to the nearest tenth, hundredth...of a decimal number, cutting down to the stated rank then:

  • if the following number is 5, 6, 7, 8 or 9, you increase the last figure of the cut number by 1.
  • if the following number is 0, 1, 2, 3 or 4, you keep the cut number.

To round up to a whole number, mark "0" as "the number of figures desired after the decimal point" or mark ROUND(numbertoround).

Example:

  • To round a price to two figures after the decimal point: ROUND($field_price,2) > If my price is "14.1576" in my product catalogue, it becomes "14.16".

function-round.png

  • To remove decimals of quantity values: ROUND($field_quantity,0) or ROUND($field_quantity) > If my quantity is "4.000" in my product catalogue, it becomes "4".

function-round-sansparametre.png

  • ROUNDUP: To round up to the nearest whole number

Syntax: ROUNDUP(number to round up to the nearest whole number)

Example: I want to round my price up to the nearest whole number:

function-roundup.png

  • ROUNDDOWN: To round down to the nearest whole number:

Syntax: ROUNDDOWN(number to round down to the nearest whole number)

Example: I want to round my price down to the nearest whole number:

function-rounddown.png

  • CALC: Perform a calculation

  • Divide: CALC(number1/number2)
  • Multiply: CALC(number1*number2)
  • Addition: CALC(number1+number2)
  • Subtraction: CALC(number1-number2)

"number1" and "number2" can be replaced by "$my_field"

With the assistance of brackets, any calculation can be performed. The function performs the calculations in order of priority.

Example: I want to calculate the reduction percentage of my reduced products.

function-calc1.png

I want to increase my sales price by 10%, round it up to the nearest whole number, and subtract 10 cents.

function-calc4.png

I want to reduce my sales price by 15% and add my shipping costs increased by 5%.

function-calc3.png

  • CURRENCYCONV: Convert a price in another currency

Syntax: CURRENCYCONV(price,iso_code)

Example: I want to convert a price into GBP.

function-currencyconv.png

Conversion rates are based on the European Central Bank (ECB) and are updated once a day.

3. Concatenate several functions

Combine as many functions as you like whilst playing with the brackets!

Example: I want to increase my sale price by 10% and round the result by two figures after the decimal point

Example: I want to limit my description to 2,000 characters and write the text in capitals.

function-truncupper.png

Example: I want to increase my sales price by 10% and convert it into euros.

function-currencyconvcalc.png

Example: The text of my descriptions is in upper-case letters. I want the first letter of each phrase to be an capital letter, whereas all the other letters will be lowercase letters.

capture-decran-2017-07-27-a-105135.png

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request