Functions

Functions in PlentyONE allow you to modify data during the allocation process before it is sent to a sales channel. They can be used for catalogues as well as the import tool.

Functions are a powerful tool for automating your data processing routines. It is recommended that you set some time aside to familiarize yourself with this feature. Prior experience with programming languages or spreadsheet programs are especially advantageous here.

The following chapters explain how you can create functions and parameters in the editor in order to automatically adjust your data for individual sales channels.

Only available for Enterprise customers

The features in the Data » Functions menu are only available to Enterprise customers at PlentyONE.

1. Quick start guide

PlentyONE has prepared a short video tutorial for this topic. You can use this tutorial to get started with building your own functions more quickly.

Quick start guide for Functions

This video includes separate audio tracks in german and english. To select your preferred audio track proceed as follows:

  1. Click on the gear wheel (settings) in the video overlay.
    → The settings open.

  2. Open the Audio track menu.

  3. Select the audio track you want to use with this video.

2. The Functions user interface

The following chapters explain the Functions user interface accessible under Data » Functions.

2.1. The overview

When you navigate to Data » Functions you will find the overview of the Functions section of your system. The overview is divided into several sections. The different sections are highlighted in the image below. The following chapters explain each section of the overview in more detail.

A diagram showing the different sections of the overview
Figure 1. Sections of the overview

2.1.1. The navigation bar

Similarly to other areas of your PlentyONE system, the Functions interface includes a navigation bar. This navigation bar is visible at the left-hand border in all areas of the Functions interface. You can use it to navigate to the functions overview (manage_search) or create a new function (add) at any time.
Any functions whose detail view you opened during your current browser session will be listed here as well, allowing you to quickly access and switch between them.

2.1.2. The functions overview

The functions overview is the centerpiece of this view. It displays a variety of information regarding the functions that have been saved in your system at a glance.

A detailed explanation regarding the columns in the functions overview can be found in the following table.

Table 1. Columns in the functions overview
Column header Content

Function name

The name of the function. Assigning a name to a function is a mandatory step in its creation.

Description

The description of the function. Descriptions can be entered in the detail view of a function when creating or editing it.

Base function

If a check mark is displayed in this column, then the corresponding function is a base function. An explanation of base functions can be found in the tooltip in the column header (info) or in the Base functions section.

Usage

This column displays whether a function is currently being used elsewhere in the system. If the function is in use you can also access its usage overview here.

Tags

The tags that have been applied to the function. Tags can be applied to a function when creating or editing it in the detail view.

Created on

The date and time when the function was created.

Created by

The name of the user account that created the function.

Updated at

The date and time when the function was last edited.

Updated by

The name of the user account that last edited the function.

2.1.2.1. Base functions

When you open the functions overview for the first time you’ll notice that a few functions have been saved in your system already. These are base functions, basic functions that have been prepared by PlentyONE in advance. Base functions are marked by a check mark in the Base function column in the functions overview.

Base functions have many different uses:

  1. They are ready to be used for automating some basic tasks out of the box.

  2. They can be used as templates for more complex functions.

  3. The comments left in their Editor area explain each part of their structure in detail, making them an excellent learning aid if you’re having trouble understanding how to build the functions you need.

Functions that are in use cannot be edited

All base functions are read-only and cannot be edited. If you want to modify a base function, you can create a copy of it instead.

2.1.3. The overview toolbar

The overview toolbar allows you to customize the functions overview to your liking.
The first line of the toolbar contains the Search bar. You can use the Search bar to find a specific function or group of functions in your system. To do so, proceed as follows:

Searching for functions:

  1. Click on the field labeled Search for functions.

  2. Enter the name of a function or an ID.

  3. Press the Enter key.
    → The results for your search will be displayed.
    Tip: Alternatively, you can use the Filter (tune) to search for a function.

The first item in the second line of the toolbar is the New function button (add). You can click on this button to create a new function.

On the right-hand side of the toolbar you will find a few tools that allow you to customize how functions are displayed in the functions overview. The following editing options are available to you there:

  1. You can use the drop-down-menu next to Results per page to select how many functions are displayed on each page of the functions overview.

  2. You can navigate between the different pages of the functions overview by using the arrow buttons.

  3. You can customize which columns are displayed in the functions overview by adjusting the Table settings (settings).

2.1.4. Usage overview

The usage overview displays which locations in the system a function is being used in and allows you to jump to those locations directly. It can be accessed via the function overview. To do so, proceed as follows:

Opening the usage overview:

  1. Go to Data » Functions.
    → The functions overview opens.

  2. Carry out the Search (search) to display functions.

  3. Find the function in the list whose usage you want to check.

  4. Check the field in the Usage column.
    → If the function is being used somewhere in the system the field will display the message “In use” and the number of usages. Otherwise, it will display the message “Not used”.

  5. Click on “In use”.
    → The usage overview for the function opens.
    Or: In the functions overview, click on the function whose usage overview you want to open.
    → The detail view of the function opens.

  6. Click on the usage overview icon (insert_chart) on the top left.
    → The usage overview for the function opens.

For each instance of a function being used in the system, the usage overview displays the name of the instance, its location in the system, a clickable link that leads to said location and the amount of times the function is being used in that location.

2.2. The detail view

When you select a function in the function overview or create a new function, the detail view of that function opens. The detail view is divided into several sections. The following chapters explain these sections further.

2.2.1. The navigation bar in the detail view

The navigation bar is accessible in the detail view as well and functions similarly to its appearance in the overview. However, it additionally displays when and by which user the currently viewed function was created and edited.

2.2.2. The functions toolbar

In the topmost section of the detail view you will find the functions toolbar. This toolbar contains a few important features:

  1. Click on Save (save) in order to save all of your changes in the currently accessed detail view.

  2. Click on Usage overview (insert_chart) in order to open the usage overview of the currently viewed function. If this button cannot be used then the function is not in use anywhere in the system.

  3. Click on More (more_vert) in order to show more options.

    1. Click on Delete to delete the currently viewed function.

Save your changes

The changes you make in the detail view are not saved automatically. Remember to manually save (save) any changes you want to make in the detail view.

2.2.3. General settings

In the General settings section you can enter data that will make it easier to recognize your function elsewhere in the system. A detailed explanation of the different data fields in this section can be found in Table 2.

Table 2. Creating a function
Setting Explanation

Function name

The name you enter here will be used to refer to your function everywhere in the system.
This field is mandatory.

Description

The description of your function is visible in certain locations in your system. Use this field to describe what your function does.

Tags

Choose tags from the drop-down list or click on add Add tag in order to create a new tag. Further information on tags can be found in the next manual section.

2.2.3.1. Adding tags to a function

You can use tags to make your functions more easily identifiable and distinguish them from other functions. To create a tag for a function, proceed as follows.

Creating tags for a function:

  1. Go to Data » Functions.
    → The overview opens.

  2. Click on the function for which you want to create a tag.
    → The function is opened.

  3. Click on the Tags field in the General settings section.

  4. Click on + Add tag.
    → The tag creation window is opened.

  5. In the field Tag name, enter a name for the tag.

  6. In the field Tag colour, choose a colour for the tag.
    *Tip:*You can either enter the hex code of a color or click on the colored square on the right and use the color picker.

  7. Click on NEXT.

  8. Check the details in the summary.

  9. Once you are satisfied with the settings, click on CREATE TAG.
    → The tag is created and automatically added to the Setup » Settings » Tags menu.

2.2.4. Editor

In the Editor section you can customize how your function works. It is divided into three subsections, as you can see in the diagram below. The following chapters explain each section in further detail.

A diagram that indicates each section of the editor.
Figure 2. Subsections of the Editor
2.2.4.1. List of functions

The left-hand section of the Editor contains the list of functions. Here you can view a list of all available functions, search for a specific function or insert a function into the editor by clicking on it or dragging it into the editor section.
A list of all functions that are currently available in PlentyONE can also be found in the section Available functions.

2.2.4.2. Editor section

The central section of the Editor is the editor section. In this section you can edit your function by inserting functions from the functions list.

Manual entry:

You can also use manual entry to edit the contents of the editor section. However, you should only use this method once you already have some experience with functions.

The top border of the editor section contains the editor toolbar. The editor toolbar contains some useful tools for building your functions:

  1. The Undo button (undo) reverts the last change you made within the editor. You can also click it multiple times to undo several edits at once.

  2. The Redo button (redo) reverts your last Undo press. Like the Undo button, it can be clicked multiple times to redo several edits.

  3. The Editor Tips (tips_and_updates) button displays a brief overview of the basic math operations that can be performed within the functions editor. A detailed overview can be found in the manual section Operators.

Functions cannot be modified in the editor while they are in use elsewhere in the system.
2.2.4.3. Test your function

The right-hand section of the Editor is the Test your function section. Here, you can test your function in order to check whether it functions as intended. To test your function, proceed as follows.

Testing a function:

  1. Go to Data » Functions.
    → The functions overview opens.

  2. Click on the function you want to test.
    → The function is opened.

  3. In the Test your function section on the right-hand side of the editor, fill out the fields for the respective parameters.
    Note: The TEST (fact_check) button only becomes available once all mandatory fields have been filled out.

  4. Click on TEST (fact_check).
    → The output preview is displayed.

Example data

In the top right of the Test your function section you will find the Example data button (auto_fix_high). When you click on this button, all empty test data fields are filled with a random selection of data from PlentyONE’s pool of example data. This will not replace any of your own test data entries.
If you’re unsure what test data to use you can simply use this example data instead.

3. Creating and editing a function

The following sections explain how to create and edit functions.

3.1. Creating a function

To create a new function, proceed as follows.

Creating a function:

  1. Go to Data » Functions.
    → The functions overview opens.

  2. Click on New Function() in the navigation bar on the left-hand side.
    Or: Click on New Function () at the top left of the overview.
    → The detail view of the function opens.

  3. Carry out the settings. Note the explanations in Table 2.

  4. Customize the function in the Editor.

  5. Save () the settings.
    → The function will be added to the overview.

3.2. Duplicating a function

If you want to create a function that is similar to another function in your system (or a base function) you can simply create a copy of that function instead. To do so, proceed as follows:

Duplicating a function:

  1. Go to Data » Functions.
    → The functions overview opens.

  2. Carry out the Search (search) to display functions.

  3. Click on the three-dot menu (more_vert) to the right of the function.

  4. Click on Duplicate function (content_copy).
    → A copy of the function with the name “Copy of (Name of the original function)” will be created and added to the overview.

Duplicating base functions

Base functions cannot be modified. However, you can create a copy of a base function to modify instead. The comments in the editor section of a base function are not carried over into any copies of it.

3.3. Editing a function

If you want to edit an existing function in your system, proceed as follows.

Editing a function:

  1. Go to Data » Functions.
    → The overview opens.

  2. Click on the function you want to edit in the functions overview. → The detail view of the function opens.

  3. Edit the settings. Note the explanations in Table 2.

  4. Customize the function in the Editor.

  5. Save () the settings.
    → The function will be added to the overview

Functions that are in use cannot be edited

All base functions are read-only and cannot be edited. If you want to modify a base function, you can create a copy of it instead.

3.4. Deleting a function

To delete a function, proceed as follows. Keep in mind that functions can only be deleted if they are not in use.

Deleting a function:

  1. Go to Data » Functions.
    → The functions overview opens.

  2. Carry out the Search (search) to display functions.

  3. Click on the three-dot menu (more_vert) to the right of the function.

  4. Click on delete Delete.

  5. Confirm the confirmation message by clicking on searchDELETE.
    → The function is deleted and removed from the overview.
    *Or:*In the overview, click on the function you want to delete.
    → The detail view of the function opens.

  6. Click on the three-dot menu (more_vert) at the top of the editor.

  7. Click on delete Delete.

  8. Confirm the confirmation message by clicking on searchDELETE.
    → The function is deleted and removed from the overview.

4. How to build a function

In this section you will find further explanations on how to build more complex functions. If you have not used the Functions feature before or do not fully understand it yet it is recommended that you read this section carefully.

4.1. Elements of a function

A function can be made of a variety of different elements. This chapter explains the different types of elements that can occur in a function.

Table 3. Elements of a function
Element Description

Name of a function

The name of a function determines how exactly that function modifies the data contained within the subsequent brackets. A list of all functions that are currently available in PlentyONE can also be found in the section Available functions.
Do not change the name of a function unless you want to use a different function.

Parameter

A function receives the data it should modify via its parameters. They can be renamed directly in the editor.
When you use a function in a catalogue, you can specify which of the data sources in that catalogue should replace each parameter in the function.

Operator

Operators are special characters that you can use to perform basic math or logic operations within a function. You can view a list of explanations for the operators that are currently supported in PlentyONE in the Operators chapter.

Value

Values have a similar function to parameters. However, unlike parameters they are static values and do not need to be specified for each use case. TIP: If you want to use a value instead of a parameter in a function, simply replace the parameter with the value in the editor.

Example

CONCATENATE(concatenateParam1, "shirt")

The CONCATENATE function combines two values exactly as entered. The two values to be combined are specified by the two parameters of the function. The default names of these parameters are concatenateParam1 and concatenateParam2 respectively.

In the example above, the concatenateParam2 parameter has been replaced with the value “shirt". Therefore, this function will always combine the value specified by concatenateParam1 with the value “shirt".

There are special formatting rules to keep in mind when inserting values into a function, depending on the type of value you want to enter. An explanation regarding the different value types can be found in the next chapter.

Comment

Comments are texts that can be inserted into the editor section without affecting the function itself. Insert // into a line in the editor section to label all subsequent characters in that line as a comment.

4.2. Value types

There are different types of values that can be used for parameters, and most functions do not support every value type. You can find out which value types are supported by a function via two methods:

  1. When you hover over the name of a function within the editor section, a tooltip will be displayed. This tooltip shows which value types are supported by each parameter used in this function, as well as the value type of the function’s output.

  2. When you hover over the name of a parameter, a tooltip will be displayed. This tooltip displays which value types can be used for this parameter.

The following table contains an explanation of the different value types that are used in PlentyONE.

Table 4. Types of values in functions
Type Explanation Example

Character string

Strings are values that consist of a sequence of characters, such as text.
Strings are enclosed by the characters ", ' or ` in the editor section.

Backticks

All characters between two backticks (`) are interpreted as part of a single string, without exception. You can use ` to insert strings that already include " or ' into a function.

"plenty"
'tshirt'
`"This is part of a string", 'This is part of the same string'`

Number

Numbers are exclusively numerical values. Within the functions editor, if a number has a decimal value, it is always separated by the character . regardless of regional differences.

4
765
3.1415

Boolean

Booleans are a special type of value used for logic operations. A boolean can only have one of two values: true or false. Unlike strings, booleans should not be put in quotation marks.
Some functions give booleans as outputs while other functions behave differently depending on the value of a boolean inserted for one of their parameters.

true
false

Generics

Generics are values whose type cannot be predetermined by the system. If the parameter of a function asks for a generic, you can use any type of value for that parameter.

true
"true"
75

List of strings

Lists consisting of several strings. When inserting a list of strings into the editor, the following formatting rules apply:

  • Lists must be enclosed in square brackets.

  • The elements of a list must be separated by commas.

  • When inserted into a function, strings must be put in quotation marks.

["plenty", "one"]
["blue", “red", “green"]

List of numbers

Lists consisting of several numbers. When inserting a list of numbers into the editor, the following formatting rules apply:

  • Lists must be enclosed in square brackets.

  • The elements of a list must be separated by commas.

[2]
[6, 34, 87567, 5]

List of booleans

Lists consisting of several booleans. When inserting a list of booleans into the editor, the following formatting rules apply:

  • Lists must be enclosed in square brackets.

  • The elements of a list must be separated by commas.

[true, false, true, true]

List of generics

Lists consisting of several generics. Do keep in mind that all elements of a list must be of the same type. When inserting a list of generics into the editor, the following formatting rules apply:

  • Lists must be enclosed in square brackets.

  • The elements of a list must be separated by commas.

  • When inserted into a function, strings must be put in quotation marks.

["blue", “red", “green"]
[6, 34, 87567, 5]
[true, false, true, true]

4.3. Inserting a function into the editor section

In order to insert a function into the editor section you can use two different methods:

Method 1:

  1. Select the function in the list of functions that you want to insert into the editor section. You can use the tooltips next to the function names (info) or the elaborations in the Available functions chapter to help you choose a function.

  2. Click on the name of the function you want to use.
    → The function is inserted into the editor section.

Method 2:

  1. Select the function in the list of functions that you want to insert into the editor section. You can use the tooltips next to the function names (info) or the elaborations in the Available functions chapter to help you choose a function.

  2. Drag the name of the function you want to use into the editor section via Click-and-Drag.
    → The function is inserted into the editor section.

4.4. Combining functions

You can also combine functions with each other by replacing the parameter of a function with another function. To do so, proceed as follows:

  1. Select the function in the list of functions that you want to insert into the editor section. You can use the tooltips next to the function names (info) or the elaborations in the Available functions chapter to help you choose a function.

  2. Highlight the parameter you want to replace with a function.

  3. Click on the name of the function you want to use, or drag it into the editor section via Click-and-Drag.
    → The highlighted parameter is replaced by the function.

By combining functions you can create more complex functions and therefore automate more complex tasks.

Example: NOT

NOT(notValue)

The NOT function is very simple: It takes the boolean value of its only parameter notValue and returns the opposite boolean. For example, if the value of notValue is true, then NOT returns the value false.

You can use NOT to flip the outputs of a boolean function, for example IS_IN_LIST:

IS_IN_LIST(isInListValue, isInListList)

If the value of isInListValue occurs in the list provided by isInListList, then the function returns the boolean true, otherwise it returns the boolean false.
However, if you want this function to return the opposite value in each case, simply proceed as follows:

  1. Click on the name of the NOT function or drag it into the editor section via Click-and-Drag.
    → The function is inserted into the editor section.

  2. Highlight the notValue parameter.

  3. Click on the name of the IS_IN_LIST function or drag it into the editor section via Click-and-Drag.
    → The notValue parameter is replaced by the IS_IN_LIST function.

The function should now look like this:

NOT(IS_IN_LIST(isInListValue, isInListList))

THis function executes the following process:

  1. If the value of isInListValue does occur in the list provided by isInListList, then the function returns the boolean true
    → The NOT function receives this value and returns the opposite boolean false.

  2. If the value of isInListValue does not occur in the list provided by isInListList, then the function returns the boolean false.
    → The NOT function receives this value and returns the opposite boolean true.

You can insert the function above into the editor section and use the Test your Function button in order to test how it handles different value combinations.

Example: IF

IF(ifCondition, ifOnTrue, ifOnFalse)

The IF function is an especially potent function that can be combined with other functions to great effect. Here is how it works:

  1. If its first parameter (ifCondition) returns the boolean true, then IF returns the value of its second parameter (ifOnTrue).

  2. If its first parameter (ifCondition) returns the boolean false, then IF returns the value of its third parameter (ifOnTrue).

The ifCondition parameter can be replaced by any function that returns a boolean. For example, it can be combined with the CONTAINS function in order to output different values depending on whether a given text contains a particular word or sentence:

IF(CONTAINS(containsSearchValue, containsSearchString), ifOnTrue, ifOnFalse)

This function executes the following process:

The IF function searches for the value of containsSearchValue in the value of containsSearchString.
→ If containsSearchValue does occur in containsSearchString, then the function returns the value of ifOnTrue.
→ If containsSearchValue does not occur in containsSearchString, then the function returns the value of ifOnFalse.

You can insert the function above into the editor section and use the Test your Function button in order to test how it handles different value combinations.

5. Available functions

The following table contains information regarding all available functions. You can also find short explanations and examples for each function in the respective tooltip (info) next to the name of the function in the list of functions.

Table 5. Available functions
Function Explanation Example Example output

ADDTOCURRENTDATE

Adds a specified amount of time to today’s date.

ADD_TO_CURRENT_DATE(10, "months")

"2026.07.29"

CEILING

Returns the smallest whole number greater than or equal to the input number.

CEILING(3.14)

4

CONCATENATE

Combines two values exactly as entered.

CONCATENATE("This is", "a tshirt")

"This isa tshirt"

CONTAINS

Checks whether a specified string contains the specified characters.

CONTAINS("tshirt", "thisisatshirt")

true

CONTAINS_WORD_LIST

Checks whether any word in the input text is contained in the given list. Returns true if at least one match is found.

CONTAINS_WORD_LIST(["this", "is", "a", "tshirt"], "tshirt")

true

DEDUP

Removes all duplicates from a specified list.

DEDUP(["this", "this", "is", "a", "tshirt"])

["this", "is", "a", "tshirt"]

FLOOR

Returns the largest whole number less than or equal to the input number.

FLOOR(3.14)

3

FORMAT_CURRENCY

Formats a number as currency and rounds it to the specified number of decimal values.

FORMAT_CURRENCY(12345.67, "de-DE", "EUR", 4)

"12345,7€"

FORMAT_DATE

Converts a date into a specific format.

FORMAT_DATE("2025.07.03", "yy-MM-dd")

"2025-07-03"

FORMAT_NUMBER

Rounds a number to the specified number of decimal places.

FORMAT_NUMBER(1234.56, "en-US", 1)

"1,234.6"

GET_CURRENCY_CODE

Returns the three-character currency code for the specified country code.

GET_CURRENCY_CODE("AD")

"EUR"

GET_CURRENCY_EXCHANGE

Converts a price from one currency to another or uses the exchange rate in calculations.

GET_CURRENCY_EXCHANGE("eur", "ron")

5.081

GET_CURRENT_DATE

Returns the current date in the specified format.

GET_CURRENT_DATE("YYYY-MM-DD")

"2025-09-30"

GET_DAYS_BETWEEN

Returns the difference in days between two given dates.

GET_DAYS_BETWEEN(2024.10.21, 2023.10.14)

373

GET_PART

Returns the specified part of a given string. based on the specified delimiter.

GET_PART("this, is, a, tshirt", ",", 2)

"is"

IF

Returns one value if a specified condition is true, and another if it is false.

IF(2>1, "visible when true", "visible when false")

"visible when true"

IF_BLANK

Returns the first non-blank part of a comma-separated list. You can evaluate up to 8 fields or functions.

IF_BLANK(["", "tshirt", ""])

""tshirt"

IS_IN_LIST

Checks whether a given list contains the specified string.

IS_IN_LIST("is", ["this", "is", "a", "tshirt"])

true

IS_NUMERIC

Checks whether a string can be interpreted as a numeric value.

IS_NUMERIC("42")

true

JOIN

Combines up to eight values with a chosen delimiter, similar to CONCATENATE. Define the delimiter first, then specify the values to be combined.

JOIN(",", ["this", "", "is", "a", "tshirt"])

"this,is,a,tshirt"

LEFT

Returns the specified amount of characters at the start of a text string.

LEFT("this is a tshirt", 5)

LEFTWORD

Returns all whole words within the specified character range at the start of the string.

LEFT_WORD(10, "this, is, a, tshirt", ",")

"this"

LIST_LENGTH

Returns the number of elements in a list.

LIST_LENGTH([1, 2, 3])

3

LOOKUP

Matches the data values in two given lists sequentially and then returns a value from the second list that corresponds to the requested value in the first list.

LOOKUP("kind", ["kind", "color", "material"], ["tshirt", "red", "cotton"])

tshirt

LTRIM

Removes all space characters from the beginning of a string.

LTRIM(" stock")

"stock"

MAX

Compares two numbers and returns the larger of the two.

MAX(3, 4)

4

MAX_LIST

Compares all numbers in a list of numbers and returns the largest one.

MAX_LIST([1, 4, 3, 2])

4

MIN

Compares two numbers and returns the smaller of the two.

MIN(3, 4)

3

MIN_LIST

Compares all numbers in a list of numbers and returns the smallest one.

MIN_LIST([3, 4, 2, 1])

1

NOT

Returns false if the argument is true. Returns true if the argument is false.

NOT(true)

false

NUMBER_TO_STRING

Returns the specified number as a value of the type "string". This function allows for numbers to be used in functions that usually only support strings.

NUMBER_TO_STRING(20)

"20"

NWORDS

Returns all words at the start of a text string up to the specified maximum and/or the specified delimiter.

NWORDS(3, ",", "This, is, a, tshirt")

"This, is, a"

PROPER

Capitalizes the first letter of each word in a text string and converts all other letters to lowercase.

PROPER("this is a tshirt")

"This Is A Tshirt"

REGEXGET

Returns the first match of a regular expression, or blank if no match was found.

REGEX_GET("this is a tshirt", "(^(shirt))|((shirt)$)")

"shirt"

REGEXMATCH

Returns true if the string contains a regular expression. Returns false if the string doesn’t contain a regular expression.

REGEX_MATCH("this is a tshirt", "(^(shirt))|((shirt)$)")

true

REGEXREPLACE

Replaces all matches of a regular expression in a string with new text.

REGEX_REPLACE("this is a tshirt", "(t?)shirt", "shirt");

"this is a shirt"

REPLACE

Replaces all instances of the specified value in a string with a specified new value.

REPLACE("This is a tshirt", "tshirt", "sweater")

"This is a sweater"

REPLACE_WORD_LIST

Replaces all specified values in a text based on multiple values from a list.

REPLACE_WORD_LIST("This is a red tshirt", ["red", "tshirt"], ["green", "sweater"])

"This is a green sweater"

RIGHT

Returns the specified amount of characters at the end of a text string.

RIGHT("this is a tshirt", 5)

RIGHTWORD

Returns all complete words within the specified character range at the end of the string.

RIGHT_WORD(6, "this, is, a, tshirt", ',')

tshirt

RTRIM

Removes all space characters from the end of a string.

RTRIM(" this is a tshirt ")

" this is a tshirt"

SORT

Sorts the elements in the given list according to the provided sorting order. All elements in the list must be of the same type. The following sorting orders are supported: ascending, a, descending, d

SORT([1, 4, 2, 3], "a")

[1, 2, 3, 4]

SPLIT

Splits a given text by the given delimiter.

SPLIT("this;is;a;tshirt", ";")

["this", "is", "a", "tshirt"]

STRING_LENGTH

Returns the number of characters in the field.

STRING_LENGTH("tshirt")

6

STRIPHTML

Removes all HTML tags from a text string.

STRIP_HTML("<p>This <strong>is</strong> a tshirt </p>")

"This is a tshirt"

TO_LOWER

Converts all letters in a text to lower case letters.

TO_LOWER("THIS SOFA IS RED")

"this sofa is red"

TO_UPPER

Converts all letters in a text to upper case letters.

TO_UPPER("this sofa is red")

"THIS SOFA IS RED"

TRIM

Removes all leading and trailing white space characters from a text string.

TRIM(" this is a tshirt ")

"this is a tshirt"

URLENCODE

Encodes a string so that it can be used in a URL.

URL_ENCODE("thisisagrüntshirt.com")

www.thisisagr%C3%BCntshirt.com

6. Operators

In addition to functions you can also use operators to modify your data. The following operators are supported in PlentyONE.

Editor Tips

An overview of the available operators can also be found in a tooltip in the editor section, accessible by clicking on the Editor Tips button.

Table 6. Operators
Symbol Function Example Result

//

Labels all subsequent symbols in the same line as a comment. Comments are not taken into account by the system when interpreting a function. They are colored light green in the editor section.

// This is an example comment

+

Adds two values together.

10 + 2

12

-

Subtracts the right value from the left value.

17 - 5

12

*

Multiplies two values with each other.

5 * 7

35

/

Divides two values by each other.

4 / 2

2

%

Outputs the remainder of a division operation between two values.

7 % 3

1

==

Checks whether two values are equal. Outputs true if they are or false if they are not.

"hey" == "hey"

true

!=

Checks whether two values are equal. Outputs false if they are or true if they are not.

"hey" != "hey"

false

++

Combines multiple strings. Keep in mind that this will not insert any separators inbetween the strings.

"this" ++ "is" ++ "a" ++ "tshirt"

thisisatshirt

||

Combines values as OR-Conditions in a boolean function. In other words, this operation will output the value true if one or both of the conditions is true.

false || false
false || true
true || true

false
true
true

&&

Combines values as OR-Conditions in a boolean function. In other words, this operation will output the value true if one or both of the values is true.

true && false
false && false
true && true

false
false
true

<

Checks whether the left value is smaller than the right value. Outputs true if it is or false if it is not.

5 < 3
4 < 4

false
false

>

Checks whether the left value is greater than the right value. Outputs true if it is or false if it is not.

4 > 1
8 > 8

true
false

<=

Checks whether the left value is smaller than or equal to the right value. Outputs true if it is or false if it is not.

5 >= 3
4 <= 4

false
true

>=

Checks whether the left value is greater than or equal to the right value. Outputs true if it is or false if it is not.

5 >= 3
7 >= 7

true
true