Send query results to Bluecore

Bluecore is a marketing technology company that intelligently connects casual shoppers to products with the goal of transforming those casual shoppers into lifetime customers.

The steps that are required to send CSV files to Bluecore from Amperity.

  1. Build a query

  2. Add orchestration

  3. Run orchestration

Caution

This destination is available for sending query results to Bluecore 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 query results to Bluecore.

Build query

You may need to build a query that shapes the data so that fields in the output are mapped to the fields required by Bluecore. Data shaping is typically required only one time.

Note

Do not include credit card information in results that are sent to Bluecore.

You can do this in the following ways:

  1. Use Spark SQL to add a SQL table 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 naming patterns.

    Note

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

  2. Use Presto SQL to add a SQL query 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.

The correct approach here depends on the data and the desired use cases for downstream workflows.

Map to Bluecore platform

Review the data type requirements for the Bluecore platform to verify all of the requirements for sending query results to Bluecore. The following sections show an example of sending data to Bluecore using the purchases data type.

Purchases query

The purchase data type requires the following fields:

  • order_id, which is the unique ID for the purchase

  • email, which is the unique ID used within the Bluecore platform

  • created, which identifies the date of the purchase, in one of the following patterns: “MM/DD/YYYY HH:MM” or “YYYY-MM-DDTHH:MM:SS”.

  • total, which identifies the sum of the purchase price for all products, including taxes, in the number format without commas and currency symbol

  • products, which identifies the product ID for each product bought as part of the purchase, separated by a pipe ( | ) character

Add a SQL table with a SELECT statement similar to:

1SELECT
2  amperity_id
3  ,order_id AS order_id
4  ,LOWER(email) AS email
5  ,order_date AS created
6  ,order_total AS total
7  ,ARRAY_JOIN(ARRAY_AGG(product_id), '|') AS products
8FROM Customer360
9LIMIT 1000

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

Bluecore requires a header row to be present in CSV files. The header row cannot start with a number or contain any special characters other than underscores ( _ ) and must be less than 30 characters in length.

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 is sent to Bluecore.

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

  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 Bluecore orchestration. Select Run.

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

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