Connectors / Service / Attentive Mobile

Attentive Mobile

Attentive Mobile

Attentive is a comprehensive personalized mobile messaging solution.

Overview

Attentive Mobile allows people the ability to add subscribers to an Attentive solution plan. Using real-time behavioral data, Attentive automatically sends engaging text messages to each subscriber at every step of the customer lifecycle.

Authentication

When using the Attentive Mobile connector, the first thing you will need to do is go to your Tray.io account page, and select the workflow you wish to work on. Once in the workflow builder itself, search and drag the Attentive Mobile connector from the connectors panel (on the left hand side) onto your workflow.

With the new Attentive Mobile connector step highlighted, in the properties panel on the right, click on 'New Authentication' which is located under the 'Settings' heading.

This will result in a Tray.io authentication pop-up window. The first page will ask you to name your authentication, and state which type of authentication you wish to create ('Personal' or 'Organisational').

As you can see, the next page asks you for your 'Access token' and asks for you to specify which API environment you would like to use the connector in (by default this is set to 'Production').

The access token will be provided by Attentive. You will need to contact them directly in order to obtain one. Currently the Attentive API is not public-facing so they do not provide a direct method for obtaining an access token.

PLEASE NOTE: If you would like to use the 'Testing' environment, you will need to provide a specific access token that has access to the Attentive Mobile API testing environment.A regular access token will not work for both production and testing.

Once you have added these fields to your Tray.io authentication popup window, click on the 'Create authentication' button. Go back to your settings authentication field (within the workflow builder properties panel), and select the recently added authentication from the dropdown options now available.

Your connector authentication setup should now be complete.

Example usage

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the Attentive Mobile connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the Attentive Mobile connector to add a collection of subscribers.

The steps will be as follows:

  1. Setup the workflow using a manual trigger and a Script helper connector in order to stimulate a data response.
  2. Loop through the list provided, and return the details of each individual item.
  3. Setup the Attentive Mobile connector to add subscribers to your Attentive mobile account.

The final outcome should look like this:

1 - Setup Trigger & Execute Script

Once you have clicked 'Create new workflow' from your main Tray.io dashboard (and named said new workflow), select the Manual trigger from the trigger options available:

After you have been redirected to the Tray.io workflow dashboard, from the connectors panel on the left, add a Script Helper connector to your second step. Set the operation to 'Execute Script'.

The purpose of this step is to make sure there is some 'dummy data' available so that the Attentive Mobile connector can has something to build with.

// You can reference the input variables using input.NAME
exports.step = function(input) {
return [
{
phone_number: '610-574-4873',
visitor_id: 'abc123'
},
{
phone_number: '610-574-4875',
visitor_id: 'abcd1234'
}
]
};

Paste this into the 'Script' input field (note that you don't need to worry about the 'Variables' field in this example, and can in fact delete these fields for now).

Feel free to re-name your steps as you go along to make things clearer for yourself and other users.

2 - Loop List

Next, search for the 'Loop collection' connector within your connector panel, and drag it into your workflow as your next step. Set your operations to 'Loop list'.

The Loop Collection connector allows you to iterate through a list of results. In this example, we will use it to iterate through the phone data found within the previous connector step.

In order to specify the list you want to loop through, start by using the 'List' mapping icon (found next to the list input field within the properties panel) to generate the connector-snake.

While hovering over the 'Execute script' step (with the tail end of the connector-snake), select result from the list of output properties displayed. This will auto-populate a jsonpath within your 'List' input field, and update the type selector.

For more clarification on the pathways you have available, open the Debug panel to view your step's Input and Output.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.
CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

This step enables the user to loop through each list item, and return their individual details. This can be viewed in the Debug panel output panel:

3 - Add Subscribers

The last step is to drag a Attentive Mobile connector inside the Loop Collection step itself. Set the operation to 'Add subscribers'. As you can see, the 'Visitor ID' and 'Phone number' fields are required.

Use the connector-snake once more only this time you should select value(Result) from the menu options displayed from the 'Loop list' step. The will output the following: $.steps.loop-1.value. In order to make sure that the visitor id is taken into account, add visitor_id to the end. Your result should be as follwos: $.steps.loop-1.value.visitor_id.

Do the same with the 'Phone number' field. Both should now be auto-populated with the jsonpath required for them to retrieve the necessary information.

Now when the workflow is run, each new contact along with their contact details, will be added to the Attentive Mobile account. You can view the results of this within your Debug panel:

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our Managing data best practices guide.

All Operations

Latest version:

1.0