First-party app
Refiner

Refiner

Read Refiner NPS and CSAT survey responses and reports, manage surveys, contacts and segments, and push user traits and events from a workflow.

stable Forms & SurveysAnalytics & BI

About

Refiner ships in the w6w first-party pack. It declares 19 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.refiner
Version
0.1.0
Author
w6w
Licence
MIT
Categories
Forms & Surveys · Analytics & BI

Overview

Refiner is an in-product survey tool for NPS, CSAT and product-feedback surveys shown inside a web or mobile app, or sent as a link. This app lets a workflow close the loop around those surveys.

On the way out, it reads survey responses (filtered by survey, date range, segment, tag, answer or user trait, with cursor pagination for large sets) and pulls aggregated NPS, CSAT, rating, distribution and view/response-count reports. On the way in, it identifies users and attaches traits, tracks events that trigger surveys, stores responses collected somewhere else, tags responses, and adds or removes users from manual segments.

It also manages the surveys themselves: list, publish or unpublish, duplicate, archive and read a survey’s change history. Contacts can be listed, fetched and deleted for compliance. Health checks read the account’s monthly tracked-user, page-view and survey-response usage against the plan limits.

Build with Refiner

Three routes to the same 19 actions. The Workflow tab is generated from Refiner's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Get Account

account-get

Fetch the subscription plan, monthly usage (tracked users, events, page views, survey responses) against plan limits, and the account's environments.

Delete Contact

contact-delete

Delete a contact AND all of its survey responses. To erase personal data but keep the responses, overwrite the traits with empty values using Identify User instead.

Get Contact

contact-get

Fetch everything Refiner holds for one contact: attributes (traits merged with survey answers), segments and account. Give one of user id, email or Refiner uuid.

Identify User

contact-identify

Create or update a contact and its traits (the backend twin of the JavaScript client's identify). Calls with the same user id update the existing contact. Optionally group the user under an account.

List Contacts

contact-list

List contacts with their attributes, segments and account. For more than ~10,000 rows, page with the cursor from `pagination.next_page_cursor` instead of page numbers.

Track Event

event-track

Record a named event for a user, which Refiner can use to trigger surveys. A user that does not exist yet is created.

Archive Survey

form-archive

Archive a survey. The vendor archives rather than deletes it.

Duplicate Survey

form-duplicate

Copy a survey into a new draft with the given name.

Get Survey Change Log

form-history

List the previous versions of a survey. Each entry carries a full snapshot of its configuration and questions.

List Surveys

form-list

List surveys (Refiner calls them forms), ordered by name.

Publish or Unpublish Survey

form-publish

Publish an existing survey, or unpublish it by turning Published off.

Get Environment

project-get

Return the Refiner environment (project) this API key belongs to — a quick way to confirm which of Production, Testing, … a connection points at.

Get Report

report-get

Aggregated survey results like the Reporting dashboards: NPS, CSAT, rating average, value distribution, or view/response counts. Defaults to the last seven days.

List Responses

response-list

List survey responses newest first, with the answers (`data`), the survey and the contact who answered. Filter by survey, segment, tag, date range, answers or traits. For more than ~10,000 rows, page with the cursor from `pagination.next_page_cursor`.

Store Response

response-store

Record a survey response for a user — historical data, or answers collected in your own UI. The survey must already exist (it can be an empty, unpublished container). Use the survey's question identifiers as the keys of Answers so reports pick them up.

Tag Response

response-tag

Add tags to an existing survey response.

Add User to Segment

segment-add-contact

Add a user to a manual segment. A user that does not exist yet is created.

List Segments

segment-list

List user segments ordered by name. `is_manual` marks the ones you can add users to.

Remove User from Segment

segment-remove-contact

Remove a user from a manual segment.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Refiner's real ids.

{
  "manifestVersion": "2",
  "name": "refiner-example",
  "steps": [
    {
      "id": "event-track",
      "uses": {
        "app": "io.w6w.refiner",
        "action": "event-track",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "event": "<event>"
      }
    }
  ]
}

Here are some of the things you can do

  • Track Event

    perform
    event-track
  • Get Account

    read
    account-get
  • Get Contact

    read
    contact-get
  • Identify User

    perform
    contact-identify
  • List Contacts

    search
    contact-list

+14 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Refiner, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Refiner. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "event-track",
  payload: {
    // id: "<value>",
    // email: "<value>",
    event: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action event-track --payload '{"event":"<value>"}'

Give an AI agent Refiner — without giving it Refiner's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.refiner#event-track",
    "input": {
      "event": "<event>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Refiner connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Refiner's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Refiner itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Refiner declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Refiner API reachable

Calls GET /v1/ and reads Refiner's own auth answer. Any schema-correct answer, including its three key-refusal messages, proves the API is serving.

service

Refiner platform status

No machine-readable status surface: status.refiner.io is a real Hyperping page with no JSON or feed route.

quota

Plan headroom

Monthly tracked users, page views and survey responses against the plan ceilings, read from GET /v1/account.