Integrating TextIt with your Application Just got Easier

One thing we've been pleasantly surprised about is how many customers want to use TextIt to integrate SMS into their applications, essentially calling out to us to trigger a flow and having TextIt take care of all the interactions. After talking through a few different uses cases we're happy to show off some of our new integration points that enable these kinds of interactions.

Webhook Variable Injection

Though TextIt provides flexible ways of storing custom fields on contacts, sometimes you want to look up attributes from an external database, like an order number or patient id. That is now as easy as adding a webhook to your flow action or rule. When a user reaches a webhook in your flow we'll call the URL you configured, passing it the text of the message they sent as well as all the other variables collected. But the best part is that if you return JSON, we'll save those values for use later in the flow.

As an example, if you configure a webhook at the start of your flow that looks up an order, it could return the following JSON:

Then anywhere else in the flow you'll be able to reference the variables via the @extra variables, like @order.description.

Of course since your webhook is receiving all the information that has been collected in the flow, you can use webhooks to save information collected in the same way.

Flow Run API

Another big request was to be able to trigger flows via our API, our newly minted Flow Run API allows just that.  A run is what we call a single pass through a flow by a contact, by using our simple REST endpoint you can list and filter all the runs on your account and retrieve the steps and values collected by each contact who passed through the flow.

You can now also start Flows by making a POST to the same endpoint, optionally passing in a set of @extra variables to use during flow execution. For example, say you wanted to trigger a field worker to perform a survey on a particular water point, you could start a user down a flow with the needed attributes by making the following POST to

We think this provides a really interesting model where TextIt can act as the "SMS Engine" for your application, dealing with tracking state, retries and error conditions while leaving you to focus on your core competencies.

Rules on Custom Variable

This one is less about APIs, but very much a developer feature: you can now create rules that split on a variable of your choice. Typically in TextIt you want to guide a user down a flow based on the text of their response, but we realized that with the addition of webhooks, there are cases where you want to define rules on a different variable instead.

To use our our earlier example of looking up an order id, we may want to route the flow based on @extra.status, so we can send the user back different messaging appropriately. You can now do that, just click on the 'different variable' link when defining your rules.

See them in Action

The easiest way to understand what is possible with the new APIs is to see them in action, so every account now has four sample flows, two of which include webhook calls and custom field rules.  Just visit the flows on your TextIt account and look for the Order Status and Customer Satisfaction Survey flows.

As always, if you have any questions about what is possible, or suggestions on how to make things easier, let us know!