Create and manage custom functions

    Custom functions let you define and execute specific operations tailored to your needs. You can start by writing a script to perform a particular task, then add arguments (inputs) required for the script to work, such as usernames, IDs, or other parameters. Once the function is ready, it can be saved and used as a macro in automations, webhooks, and event-driven automations.

    This feature makes your automations more flexible by allowing you to include tasks that aren’t covered by standard options. You can handle custom validations, process data, or integrate with other systems, making automation simpler and more effective.

    Built-in functions

    ADManager Plus provides the following built-in functions that can be used in automation and event-driven automations. These functions are pre-built and can be easily customized to meet your needs, making it simple to manage tasks and processes.

    • Find and Replace: This function lets you search for a specific part of a source string and replace it with another string. It supports both source strings and macros, making it useful for various data-handling tasks.
    • Encode URI: Similar to the Javascript encodeURI function, this function helps you encode the API URL and parameters of webhook templates before execution. If needed, you can use it to encode any other values, ensuring proper formatting for API requests.
    • Decode URI: Working like the Javascript decodeURI function, this macro decodes encoded attribute values fetched from integrated applications. Simply input the value you want to decode in the designated field.
    • Retrieve Regex Matches: This function allows you to search for specific patterns in attribute columns from a configured endpoint. By defining the column name and pattern to match, the macro filters and returns only the relevant string pattern for API processing, discarding unnecessary data.

    Custom functions

    Manage scripts with defined arguments to enable customized actions. These functions integrate seamlessly into automations, webhooks, and event-driven processes for streamlined task execution.

    Steps to create a new custom function

    1. Navigate to Admin > Custom Settings > Custom Functions to access the configuration page.
    2. Enter a unique name for the function (without special characters or spaces) along with a brief description for clarity.
    3. Provide a Display Name for the custom function.
    4. Click the Function Type drop-down and select the type of custom function.
      • Script: You can use the Script option to create an environment variable whose value is retrieved from a script. The resulting value from the script execution while the variable macro is parsed will be used as the value of the environment variable.
    5. Enter the path to the script file in the Script Path field.
    6. If required, add arguments in the Arguments field in the correct order. You can either select macros from the Select Macros option or manually enter values. Supported macros include Active Directory, Microsoft 365, Environment Variable, and Action Detail.
    7. Enter the time limit for the script to be executed in the Timeout in Seconds field. If the script exceeds this limit, the process will be suspended.
    8. Click Test and Save to test the function. A pop-up will appear where you can provide sample arguments or use predefined ones. Click Test to check the script and review the results.
    9. Click Yes to confirm and finalize the function. Review the details and save the configuration by clicking Save.
      Note: The test output only previews the result and is not the actual script variable value. The script retrieves values dynamically during execution when its macro is parsed.

    Don't see what you're looking for?

    •  

      Visit our community

      Post your questions in the forum.

       
    •  

      Request additional resources

      Send us your requirements.

       
    •  

      Need implementation assistance?

      Try OnboardPro