Skip to navigation

Create a function from templates

View as Markdown

Learn how to create a function from built-in templates.

To create functions, you must have a basic understanding of JavaScript functions. For more information, see JavaScript and Functions in MDN Web Docs.

1

Navigate to Custom logic entry in the left navigation menu.

2

Click Create Logic and then click Create from Templates.

3

In the “Choose a template from library” dialog, select the template on which the function is based:

  1. Click Functions in the Categories section.
  2. Select an object from the dropdown list.
  3. Select a template in the Functions section. Available templates vary depending on the object you selected in step b.
4

Optional: In the Create New Logic dialog, update the prepopulated information as needed:

  • Name
  • Description
5

Click Save And Continue. The function editor opens.

6

Optional: Update the JavaScript code and test the function. For more information, see Test a function.

7

If you want to activate the function, click Activate. Active functions are effective immediately, whereas draft functions are not. Note that only one active function is allowed for each object.

8

Click Save.