Creating a function
Creating a function packages executable logic into a reusable, versioned endpoint you can run inside the platform or invoke via API. Every function is built and managed in the Function Editor.
Two ways to build
Section titled “Two ways to build”- Chat with RivalBot — describe what you want in plain language. RivalBot generates the code, test cases, metadata, and icon, then drops you into the editor to review. See Building functions with RivalBot.
- Manual — start from a blank function template and fill in each configuration step yourself.
Before you start
Section titled “Before you start”Make sure you have:
- Access to an active organization workspace.
- A clear plan for what the function should do, including its input parameters and expected output structure.
- Your chosen implementation language: Python, JavaScript, Lua, or Storm. For code-level detail, see the Developer guide.
The Function Editor, step by step
Section titled “The Function Editor, step by step”The editor walks you through six configuration panels.
-
Basic Info — define the function’s identity. Give it a unique name, a short description, and category or sector tags that drive marketplace search. Select the language and function type here. Both are fixed once chosen and cannot be changed later.
-
Code — the main development surface. Write your execution handler, define input schemas and event structures, attach the environment secrets the function needs, and use the interactive test panel to run test cases against your draft in real time.
-
Branding — upload a custom icon, or let the system generate one for you.
-
Overview — write a concise, plain-language description of what the function does and when to use it. This is the first preview text a marketplace user reads.
-
Documentation — provide long-form markdown covering inputs, outputs, example API calls, and edge cases, so other builders can pick it up.
-
Publish — set Visibility to Private (only you can use it) or Public (available to everyone in your organization’s Marketplace), add release notes, and publish. Public functions are queued automatically for marketplace review.
After publishing
Section titled “After publishing”Your function gets a stable URL, becomes callable via the API, and appears in My Tools.
- Management — monitor execution runs, publish updated versions, edit metadata, or deprecate older builds.
- Immutable versioning — every publish creates a new immutable version. Shipping a small, reliable v1 first lets you iterate without breaking anyone’s existing setup. See Versions and publishing, which covers functions as well as workflows.
Governance
Section titled “Governance”The build steps are the same in every workspace. What governance decides is whether a team member’s function needs administrative approval before others can adopt it. Environment secrets attached during the build stay secure, so team members can run approved functions without ever handling the credentials themselves.
See Governance and approvals and the Capability matrix.
Creation workflow summary
Section titled “Creation workflow summary”| Stage | Action required | Primary output |
|---|---|---|
| Preparation | Determine inputs, outputs, and implementation language | Defined function scope |
| Development | Write handler code and test in the Function Editor | Validated logic |
| Documentation | Add overview, parameters, and branding | Complete listing page |
| Publishing | Set visibility and release notes | Versioned endpoint |
| Management | Track execution telemetry and publish updates | Maintained asset |