×Overview

Getting data out

Information you collect is only useful if you can access it. The Integrations tab in the variants page is where you can define and customize the ways you can receive information collected in your flows.

Templated redirect URL

The simplest way to pass data into another system is by using answer variables in a redirect url for any terminal steps. Read more about this in Conditions and logic.

Webhook

The most robust way to receive data during a flow's progress and completion is to set up an endpoint for ingesting webhooks. Formsort can send data to this endpoint after each step, or only at the end of the flow (on_finalize).

Shape of the data

The webhook is a POST of JSON data in the following shape:

{
  ...answers,
  [responder uuid alias?]: string
  "variant_label": string,
  "variant_uuid": string,
  "finalized": boolean
}

If you'd like the responder uuid to be included, you can give it an alias in the webhook configuration.

It's possible to change the shape of the data, for example to nest the answers under their own key, or put them into an array.

Testing webhooks

You can send a test webhook with dummy data for a variant with the Send test webhook button, or just inspect a sample webhook body with the View webhook payload button.

Signing requests

If you'd like the requests to be signed to ensure that they are authentic requests from formsort, you can enable the sign security.

The payloads will be signed with the following Python code. You can obtain the key in the Integrations tab when this option is enabled.

def as_bytes(v):
    return v.encode("utf8")


def hmac_sign(k, m):
    key = as_bytes(k)
    message = as_bytes(m)
    return (
        base64.urlsafe_b64encode(hmac.new(key, message, hashlib.sha256).digest())
        .rstrip(b"=")
        .decode("utf8")
    )

Cookies

If you would like formsort to set cookies at the root domain of your integration with answer values, you may pick specific answer variables to set in the Schema tab by checking the Store in cookie checkbox. These cookies will be set using the answer variable as the key on the root domain. For example, if your flow is at flow.example.com, any variables with Store in cookie set will be placed on the .example.com domain.

Previous
« Passing data in

Contact
  • hello@formsort.com
  • Jobs
  • Security
Resources
  • Formsort Inc
    © 2020