Commerce Library Functions (Redwood)

Overview

This topic covers managing Commerce library functions using the Redwood interface pages. Refer to Library Functions for process administration using the classic interface pages.

The Commerce Library Functions are only accessible only to a main document. Each Commerce BML library has a 1:1 relationship with a main document and sub-document pair.

Commerce Library Functions

The Library Functions tab is used to manage Commerce library functions.

Library Functions

Item Description

1

Access the Deployment Center

2

Search for library functions

3

Add a new library function

4

View or edit a library function

5

View items referenced to this library function

6

Delete or copy a library function. You cannot delete Standard Process library functions.

Function Editor

The Library Function Editor tab is used to add, edit, or view a Commerce library function.

To access Commerce library functions,

Function Editor

Item Description

1

The function name

2

The function variable name

3

The data type of the function delivers

4

The function description

5

Create Override is shown for Standard Process functions.

  • When a function is overriden, a Override badge appears at the top of the function editor and next to the function name in the Commerce Library Functions list.
  • You can modify the function properties and the function script.
  • Click Remove Override to quickly return to the standard default values.

Override Function

6

Displays help information for BML functions, statements, operators, time zones, and Commerce rules.

7

Manage function properties and test the function.

8

Validate the function script.

9

Enter the script into the Function Script section. Save your changes after writing or editing a script.

Administration

ClosedAdd a Commerce Library Function

Complete the following steps to create a Commerce library function.

  1. Navigate to Admin Home > Quotes > Process > Manage Transaction > Library Functions.
  2. Click + Create Library Function.
  3. Enter the Name, Variable Name, Description and select a Return Type.

  4. Enter your script into the Function Script section.

  5. Click Function Editor Properties to select and enter Parameters, System Attributes, Transaction Attributes, Transaction Line Attributes, Library Functions or Standard Functions.

    ClosedParameters

    To enter a parameter:

    1. Open the Properties section and click on the Parameters tab.
    2. Enter the Name and select the Type.
    3. Click the SubmitInsert icon icon to enter the parameter into the Function Script.
    4. Click the Delete Trash iconTrash icon icon to remove a parameter from the properties list.

    ClosedSystem Attributes

    To enter a system attribute:

    1. Open the Properties section and click on the System Attributes tab.
    2. Select the applicable System Attribute from the Name menu.
    3. Click the Submit Insert icon icon to enter the system attribute into the Function Script.
    4. Click the Delete Trash icon icon to remove an attribute from the properties list.

    ClosedTransaction Attributes

    To enter a transaction attribute:

    1. Open the Properties section and click on the Transaction Attributes tab.
    2. Select the applicable Transaction Attribute from the Name menu.
    3. Click the Submit Insert icon icon to enter the transaction attribute into the Function Script.
    4. Click the Delete Trash icon icon to remove an attribute from the properties list.

    ClosedTransaction Line Attributes

    To enter a transaction line attribute:

    1. Open the Properties section and click on the Transaction Line Attributes tab.
    2. Select the applicable Transaction Line Attribute from the Name menu.
    3. Click the Submit Insert icon icon to enter the transaction line attribute into the Function Script.
    4. Click the Delete Trash icon icon to remove an attribute from the properties list.

    ClosedLibrary Functions

    To enter a Utils Library or Commerce Library function:

    1. Open the Properties section and click on the Library Functions tab.
    2. Select the applicable Utils Library or Commerce Library function from the Name menu.
    3. Click the Submit Insert icon icon to enter the library function into the Function Script.
    4. Click the Delete Trash icon icon to remove a library function from the properties list.

    ClosedStandard Functions

    To enter a standard function:

    1. Open the Properties section and click on the Standard Functions tab.
    2. Select the standard function Category.
    3. Select the Function.
    4. Click Move arrow icon Insert into editor to enter the standard function into the Function Script.

  6. To test your Function Script, click Validate.

  7. Click Save.


Notes

Notes:

  • Library functions can be created if there isn't a pre-defined function for what you are trying to accomplish.
  • Importing a main document Commerce Library Function which imports sub-doc attributes into a BML script on the sub-doc level, will force a loop over all line items.
  • Commerce Library functions can call other Commerce Library functions. Commerce Library functions can call Util Library functions.

  • Util Library functions can call other Util Library functions. Util Library functions cannot call Commerce Library functions.

Related Topics

Related Topics Link IconSee Also