Plug Database icon

Plug Database

Run Plug Database commands over REST or Socket.

Tools → Build Socket Event Payload

AI-generated

Summary

Construct the JSON payload for a Plug custom socket event, composing an event name and a JSON payload object accessible as a specified output property.

Inputs

  • Tool Category — Select the category of tools to display; for building a socket event payload, this selection has no effect on the output.
  • Event Name (required) — Specify the name of the custom socket event to build the payload for.
  • Payload JSON (required) — Define the JSON content to include as the payload of the socket event.
  • Output JSON Property — Set the JSON property name on the outgoing workflow item where the constructed socket event payload is stored; defaults to 'socketEventPayload'.

Output shape

a single JSON object

The output contains the constructed socket event JSON payload object under the user-configured output JSON property name. This object includes the event name and the specified payload JSON, ready for publishing via a socket event operation.

Examples

Example 1: Build a socket event payload with event name 'client:custom.status.changed' and payload JSON {"status":"active"}, storing it in output property 'socketEventPayload'.

Tool Category: 'Socket', Event Name: 'client:custom.status.changed', Payload JSON: {"status":"active"}, Output JSON Property: 'socketEventPayload'

Links

Discussion