Welcome to Zuora Product Documentation

Explore our rich library of product information

Function format

Introduces the format and best practices of using functions.

Coding language

Custom logic functions are JavaScript (ES11) code snippets that perform data validations or calculations on specific object records. Each function is an Immediately Invoked Function Expression (IIFE) linking to a particular object.

For more information about JavaScript and JavaScript functions, see JavaScript and Functions in MDN Web Docs.

Best practices for using functions

It is recommended to follow these best practices when using functions:

  • Use conditional statements in validation functions.

    You should use conditional statements (for example, if-else ) in validation functions to specify validation rules.

  • Return only fields that need to be updated in formula functions.

    It is best practice to return only the fields that need to be updated in formula functions. Zuora ignores the returned fields that are not defined on the source object.