Spanish Total.js
Deutsch
Dokumentation Für KI-Agenten
Inhalt

React to events from a Total.js app

Print every order that a Total.js app publishes, and send a status back.

.md Website

Diese Seite ist noch nicht übersetzt. Du liest das Original.

Auf dieser Seite

In this recipe a Total.js app publishes an orders_create event for each new order and accepts an orders_status event. FlowOS prints each new order and can send a status back. Use the names of your own app's events.

Connect the app

Add the app as a TMS source with its TMS endpoint and token. See Connect apps with TMS. Its events appear on the left: orders_create under Subscribe and orders_status under Publish.

  1. Drag orders_create from Subscribe onto the canvas.
  2. Drag Print onto the canvas.
  3. Connect the Output of orders_create to the Input of Print.
  4. Select APPLY and confirm.

When the app publishes an order, Print shows it.

The orders_create node connected to Print, which shows a demo order

Send a status back

  1. Drag orders_status from Publish onto the canvas.
  2. Connect a node that produces the status, for example a Trigger that sends an object, to the Input of orders_status.
  3. Select APPLY and confirm.

Each message that reaches orders_status is sent to the app as that event.

Hergestellt in Europa