# Apps in the product, for its users Back to the skill: https://viasocket.com/docs/skill.md The product's users bring their own apps and the product acts in them: reads their data, writes to them, reacts to their events. What the users get is a Connect button per app in the product's own screens. After it, the product runs that app's actions for them (send a message, add a row, fetch a report) and reacts to that app's events (a new lead, a new message), from the server, as that user. The product builds and holds no OAuth, no webhook and no app's quirks: viaSocket keeps each connection alive, and the product keeps one id per user and app. ## Ways to do it Every way starts with the user's connection (https://viasocket.com/docs/skill/connect.md). A product can use several. | way | use it when | what it costs or gives | read | | --- | --- | --- | --- | | a flow per user, one step per action | the product's code, or the user from a list, knows the action before it runs | retries and run history; a step can wait for a person, a set time or the app's reply | https://viasocket.com/docs/automations.md | | the enabled app | the product's AI picks the action at run time | one-shot: it cannot wait; its `script_id` acts as the user, so it stays on the server | "Flow or enabled app" on https://viasocket.com/docs/skill/actions-and-events.md; as tools for the product's own agent: https://viasocket.com/docs/skill/agent-tools.md | | a subscription | the product reacts to an app's events | a handler runs on viaSocket for each event; the product keeps the only copy of its record | "Events" on https://viasocket.com/docs/skill/actions-and-events.md | | viaSocket's ready screens | the users build their own automations | the fewest screens to build: catalog, Connect, forms and their flow list, mounted in the product | https://viasocket.com/docs/embed.md | | the product's own screens | the product draws its own integrations page | full control of the look; the product renders the catalog and each action's form | https://viasocket.com/docs/catalog-api.md | ## Steps Work as the skill's "How to work" says (https://viasocket.com/docs/skill/working.md). What this feature adds to it: 1. **Read, no sign-in yet.** "Find what to call" on https://viasocket.com/docs/skill/actions-and-events.md finds the app, its actions and triggers, and each one's key and version. 2. **The plan's table.** Each input of each action or trigger is a product decision: what the user is asked, and when. So show every row to the developer, and save the table in `viasocket-plan.md` and the report (working.md says how): | app | action or trigger (key, version) | key of `inputData` | who supplies it | when | | --- | --- | --- | --- | --- | | google-search-console | `fetch_Search_Analytics` `v9` | `siteUrl` | the user, from a list of their sites | once, right after Connect; stored with the connection | | google-search-console | `fetch_Search_Analytics` `v9` | `startDate`, `endDate` | the product (last 28 days) | per run | The `when` column follows "Once, or per run" on https://viasocket.com/docs/skill/actions-and-events.md. Below the table, add one line per action: which way it runs ("Ways to do it"), and where the user sees and changes their choices. 3. **The keys and a test connection,** after the yes: https://viasocket.com/docs/skill/setup.md, then https://viasocket.com/docs/skill/test-connection.md. 4. **Build.** What else the product may need: | the product needs to… | read | | --- | --- | | let a user connect an app and store the `auth_id` | https://viasocket.com/docs/skill/connect.md | | read options from a connected app and run its actions | https://viasocket.com/docs/skill/actions-and-events.md | | show its own name, not viaSocket's, on an app's consent screen, with its own client ID and secret; only when the developer asks, since viaSocket's works without one | https://viasocket.com/docs/skill/own-oauth-app.md | | list, pause, reconnect or revoke what a user has | https://viasocket.com/docs/skill/manage.md | | be told on its server when a user's connection expires or a user's flow fails | https://viasocket.com/docs/skill/alerts.md | ## Limits - **An app viaSocket does not have:** report it (https://viasocket.com/docs/skill/feedback.md, "When viaSocket lacks it"), or build its plug (https://viasocket.com/docs/skill/plugs.md). - **A missing action or field on an app viaSocket has:** report it the same way; for a call the app's API makes and no action covers, "Your own code with the user's connection" on https://viasocket.com/docs/skill/actions-and-events.md. ## Finished when Each line below is decided, and the report says how. A request as short as "integrate Slack" still needs every line, for each action and trigger it uses. - **Who connects:** whoever owns the app account: a person, or for a company account its admin. The `auth_id` is stored per user and app, under the product's own stable id for that owner (https://viasocket.com/docs/skill/connect.md). - **Its whole life:** an expired connection is reconnected in place with its own `auth_id`, so nothing built on it changes (the product hears of it through https://viasocket.com/docs/skill/alerts.md). A user who connects a different account, or disconnects, gets every flow and subscription on the old one updated or paused before it is revoked (https://viasocket.com/docs/skill/manage.md). Each write (one row per invoice, one post per ticket) happens once, even when it is triggered twice. - **Each input:** every key of every `inputData` is in the plan's table, decided by "Once, or per run". - **Each action's way:** one row of "Ways to do it" per action and trigger. - **Where it runs:** actions run from the server, and each `script_id` is used only for the user who owns it. The browser holds only the embed token, plus an expired connection's own `auth_id` to reconnect it (https://viasocket.com/docs/skill/connect.md). - **Tested:** each action ran once on the test connection and each subscription saw a real event; anything that did not is **UNTESTED**, with why. END OF PAGE