Skip to content
Dashboard

Prescient AI

Use the Prescient AI connector to sync marketing mix modeling (MMM) output — including halo effects — and platform-reported spend into your Athena lakehouse. This is a Blotout custom connector built on the Airbyte Connector Builder (declarative manifest).

  • A tag with Blotout Cloud set up (green checkmark in the Tags table)
  • Prescient AI API access enabled on the account (requires CSM request)
  • An API token generated by an org admin under Settings → API — displayed once; if lost, generate a new one
  • Be aware: tokens can be channel-scoped — a scoped token returns a subset of channels with no error

Follow the shared Create a pipeline steps until the source catalogue appears, then select Prescient AI.

On the Source step, configure the connector:

FieldPurpose
Schedule TypeHow the pipeline runs — typically Scheduled
Sync FrequencyHow often Airbyte syncs (for example, Every 24 hours)
Source NameName for this pipeline — used in the Athena schema <SOURCE_NAME>_<ENV>

Every request carries Authorization: apikey <token>. Note: the scheme word is apikey, not Bearer.

FieldTypeRequiredDefaultDescription
api_keysecret stringYes—Prescient AI API token. Sent as Authorization: apikey <token>.
start_datestringYes—Earliest marketing day to pull (YYYY-MM-DD). This is the full history window — set it to the start of the client’s Prescient history. Not the incremental cursor.
end_datestringNoTodayLeave blank for scheduled connections.
lookback_daysintegerNo7Rewinds the processDate cursor only — guards against restatements landing mid-sync. Does NOT control how far back marketing days are read.
sales_channelarrayNoBothECOMMERCE / RETAIL filter for modeled_metrics. Empty = both.
base_urlstringNohttps://api.prescient-ai.ioThe connector appends /graphql.
  • Incremental Sync — Append (modeled_metrics, reported_metrics)
  • Full Refresh (models, channel_names)
StreamCursorPKSync Mode
modeled_metricsprocessDatereportedDate, sourceChannelName, sourceCampaignId, metricName, target, targetChannelNameIncremental
reported_metricsprocessDatereportedDate, channelName, campaignIdIncremental
models—nameFull Refresh
channel_names—id (constant)Full Refresh

Modeled attribution per campaign per day, including halo effects. Rows are long/EAV — one row per metric, so a single campaign-day produces many rows.

metricName is one of eight values:

REVENUECONVERSIONSLEADSSUBSCRIPTIONS
FIRST_ORDER_Direct, last-click-style credit
SECOND_ORDER_Halo credit on another channel

sourceChannelName = what was spent on. targetChannelName = what got the credit (populated on SECOND_ORDER rows only; null for FIRST_ORDER).

metricValue has no intrinsic unit — join target → models.name → models.unit to determine if it’s revenue, customers, or subscriptions. Never sum across models without checking the unit.

reported_metrics — platform-reported spend

Section titled “reported_metrics — platform-reported spend”

What the ad platforms said was spent, before Prescient models anything. Join to modeled_metrics on campaign + date to get modeled return against actual spend.

One row per model: name and unit. Joins to modeled_metrics.target. Also the check stream.

A single row listing the channels this token can see. Use it to verify token scope — a scoped token returns a subset with no error.

  • Schema: prescient_ai_<client>_prod.*
  • Deduplication (both metric streams are Append; restatements arrive with different values):
SELECT * FROM (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY reportedDate, channelName, campaignId
ORDER BY _airbyte_extracted_at DESC
) AS rn
FROM prescient_ai_<client>_prod.reported_metrics
) WHERE rn = 1
  • To pivot modeled_metrics from long to wide:
SELECT reportedDate, sourceChannelName, sourceCampaignId, target,
SUM(CASE WHEN metricName = 'FIRST_ORDER_REVENUE' THEN metricValue END) AS first_order_revenue,
SUM(CASE WHEN metricName = 'SECOND_ORDER_REVENUE' THEN metricValue END) AS halo_revenue
FROM modeled_metrics_deduped
GROUP BY 1, 2, 3, 4
VersionDateDescription
1.0.02026-09Initial release with 4 streams: modeled_metrics, reported_metrics, models, channel_names

Continue through the Schema and Summary steps to choose streams and confirm the connection. Save and run the first sync.

After a successful sync, Airflow creates an organization-scoped DAG for the pipeline, and dbt models feed downstream analytics.