Adding Fields to Actions and Triggers


Actions/Triggers in plugins require an input form because they always need a way for users to send data to your app’s API to find, update, or create a new object. When building a plugin action or trigger on the Platform viaSocket, use the JSON or GUI to create the user input form for your app's API. 

JSON (JavaScript Object Notation) : When building a plugin, JSON is used to define the structure and behavior of forms that users interact with. Here’s how JSON is typically utilized in this context:



viaSocket GUI  : The GUI functions like other form builders, creating forms within the Platform UI. Add fields to the form matching the data required by your app, using the same names as in your app’s UI.

This guide covers:

 Adding Input Fields in JSON:

Adding Fields through GUI:

Adding Input Fields in JSON:

key: A unique identifier for the field. It should be concise, without spaces, and ideally match the key for each field, used to send data in API , such as ‘username’.

Label: A name or label visible on the UI for the field, such as "Name".

type: Defines the type of input field, such as string, number, dropdown, input groups, etc. Refer to the plugin input fields documentation for more details on types.

help (optional): A longer description that appears under the field, with markdown formatting support .For example “Enter or select Account username”.

placeholder (optional): A placeholder for a field, shown inside the input field for example text. This can be used as an alternative to help text.

required :  Indicates whether the field is mandatory. If the key is not provided, it defaults to false. If the field is required by the API and users must provide a value, set it to true.

Source:  In case of dynamic data in the field a new JSON key is added “source”. Specifies the source of the data for the field, such as a URL or API endpoint. Discussed in advance input fields section

children:  Similarly a new key required in case of dropdown,input groups which   hold child elements of fields. Explained in advance input fields section


Adding Input Fields using GUI: