Connect a calculation on the server
Some things should not be worked out in a visitor's browser — an assessment you would rather not publish, applied to figures they would rather not publish either. This page is the whole chain for one of them, running: a link, the values that go with it, the answer back in variables, and the flow carrying on.
- Your web developer
- Writes the calculation and puts it behind a link. Nothing about Flowweaver — an ordinary endpoint that takes JSON and answers with JSON.
- You
- Add the control, paste the link, tick the values that go with it, and say which fields land in which variables. Then use them like any other answer.
The logic never reaches the visitor's browser — and neither does the reason for the answer.
1. What your developer builds
One request, one answer. This is the request the guide below would send once a visitor has filled in the two questions, and the answer it expects back — both read from the control itself, not written out here.
…
On this site there is no backend, so the control answers from its own sample response. That is also how it behaves in the editor and in a preview, which is what lets a guide be built and walked through before the endpoint exists. The mapping is the same either way; only where the JSON comes from changes.
2. What you wire in
Three things, and none of them is code: where to call, what to send, and where the answer lands.
…
Open Fetch the maximum amount in the editor and you will find exactly those fields. The two questions before it decide what there is to send; the rule after it routes on decision — a field the visitor never sees.
3. Save the control as a template
The same call usually belongs in more than one guide, and reconfiguring it by hand each time is how one of them ends up pointing at last year's address. Save it once and place it, like any other node.
Open the node's menu on Fetch the maximum amount and choose Save as template. The box below shows what your system is handed the moment you do — the library stores nothing itself.
…
4. And it runs
The same guide, as a visitor meets it. Answer the two questions and the amount in the result comes from the response — the step in between passes without anyone seeing it.