Send query results to Vibes

Vibes offers a variety of mobile marketing products and services, such as text message marketing (SMS or MMS), mobile wallet marketing, push notifications, and mobile web experiences.

You can use a flat-file (CSV) batch process to send query results from Amperity to Vibes to update recipient list data. This process supports downstream workflows, such as for:

  • Users who interact with campaigns from mobile devices

  • Interactive campaigns, including incentives, contents, and info-on-demand

  • Loyalty programs and offers

Files that are sent to Vibes are routed based on a required filename pattern. After the files are processed, an SMS message or push notification is sent to the recipient list from the Vibes platform.

This topic describes the steps that are required to send CSV files to Vibes from Amperity.

  1. Build a query

  2. Add orchestration

  3. Run orchestration

Caution

This destination is available for sending query results to Vibes after it is configured by a Datagrid Operator or your Amperity representative.

If this destintion cannot be selected from the campaigns editor or activations canvas ask your Datagrid Operator or Amperity representative to configure a destination for sending sending query results to Vibes.

Build query

You will need to build a query that shapes data to the fields required by a Vibes recipient list. A recipient list is customizable, which may require a unique query for each recipient list.

You can do this in the following ways:

  1. Add a SQL table (using Spark SQL) to the customer 360 database that selects PII fields from the Customer 360 table, and then outputs them to a table with columns that map to the required patterns.

    Note

    PII fields may require SHA-256 hashing or conversion to a UUID using the CAST() function.

  2. Add a SQL query (using Presto SQL) that filters within the query, and then outputs results that map to the required patterns.

    Note

    PII fields may require SHA-256 hashing or conversion to a UUID using the CAST() function.

Choose the approach that works best for your use case (or use cases) and downstream workflows.

Map to Recipient List

A recipient list is a collection of references used as a target filter for messages. A recipient list must include one of the following fields that acts as the unique ID:

  1. person_id; must be lowercase

  2. person_key; must be lowercase

  3. external_person_id; a unique ID that exists in an external system

  4. mdn; the mobile directory number (MDN)

    Important

    The mobile directory number for phone numbers in the USA may use the 10-digit MDN format.

    The MDN for international numbers must be in E.164 format, which is a plus symbol ( + ) followed by the country code and phone number without spaces. For example: “+12205551234”.

The unique ID acts as the row identifier and rows may include additional columns that act as message variables.

A SQL query built using Presto SQL can return results for use with any Vibes recipient list. For a recipient list with custom fields, add a SQL table with a SELECT statement similar to:

1SELECT
2  amperity_id AS "external_person_id"
3  phone AS "mdn"
4  given_name AS "first_name"
5  surname AS "last_name"
6  loyalty_points as "points"
7FROM customer360
8LIMIT 2000

For a recipient list that applies personalization for first name and city:

1SELECT
2  amperity_id AS "external_person_id"
3  phone AS "mdn"
4  given_name AS "personalization_1"
5  city AS "personalization_2"
6FROM customer360
7LIMIT 2000

For a recipient list that only requires a mobile device number:

1SELECT
2  phone-mobile AS "mdn"
3FROM customer360
4LIMIT 2000

Add orchestration

An orchestration defines the relationship between query results and a destination, including the destination and the frequency at which an orchestration runs.

Important

Refer to the Vibes documentation if you plan to import a recipient list with included headers.

To add an orchestration

  1. Open the Activations page, select the Orchestrations tab, and then click the Add orchestration button. This opens the Add orchestration dialog box.

  2. From the Object type dropdown, select Query.

  3. From the Object dropdown, select the query for which results will be sent to Vibes.

  4. From the Destination dropdown, select a destination that is configured for sending data to Vibes.

  5. Verify all settings.

  6. Set the workflow to Manual. (You can change this to automatic later, after verifying the end-to-end workflow.)

  7. Click Save.

Run orchestration

Run the orchestration manually to validate that it works.

To run the orchestration

  1. Open the Activations page, select the Orchestrations tab, and then open the    menu for the Vibes orchestration. Select Run.

  2. The Status column for the orchestration will update to say “Waiting to start…”, after which the notifications pane will update to include a notification that shows the current status.

  3. When the orchestration has run successfully, the status is updated to “Completed”.