Operational

DocsGithub Open app

Operational

Github Articles Pitch Usecases Playground API

Contents

Start hereSetup Operational
Guided setup
IntroductionCreate project and API keyManage projects and teammatesSend your first eventStructured eventsAdd actionsGroup events with contextsCategories and searchView events in your projectSetup PWA on phoneLog limits and errors
The Manual
IntroductionPWA & push notificationsConventionsSetupTest modeNotifications
Integrations
Nodejs SDKPHP SDKWordpress plugin
Events API
IntroductionSend your first eventEvent parametersStructured EventsActionsContextsCategoriesError handling
Self hosting
IntroductionInstall locallyInstall on VPSInstall on RenderInstall via DockerInstall via Docker and CoolifyOnboardingSetup .envSetup PWA & push notificationsBest practicesDurability testing
Other
VisionRoadmapContributing

Add actions

Actions add buttons to an event card. When someone clicks a button, Operational sends a request to your server.

const e = {
  name: "high risk login detected",
  avatar: "🚨",
  category: "security",
  actions: [
    {
      url: "https://api.your-app.com/ops/action",
      buttonText: "Suspend account",
      key: "suspend_account",
      meta: { userId: "usr_123" },
      expireIn: 120,
    },
    {
      url: "https://app.your-app.com/admin/usr_123",
      buttonText: "Open user profile",
      external: true,
    },
  ],
};

A simple server handler:

app.post("/ops/action", async (req, res) => {
  const { event } = req.body;
  if (event.key === "suspend_account") {
    await suspendUser(event.meta.userId);
  }
  return res.status(200).json({ ok: true });
});

Rules to remember:

  1. url and buttonText are required.
  2. buttonText must be 48 characters or less.
  3. key is required unless external: true.
  4. expireIn defaults to 10080 minutes (7 days).
Structured eventsGroup events with contexts

Operational

PrivacyTerms
About the product
  • Use cases
  • Playground
  • API
  • Pitch
  • Pricing
  • Wordpress plugin
Related to the product
  • Open Source
  • Articles
  • VS Logsnag
Useful articles for your SaaS
  • My experience running a Commercial OSS project
  • Force post: The Payment Hack that lets Merchants charge you without approval
  • 6 Best practices for early stage B2B SaaS customer support
  • Setup event notifications for your SaaS