Lens

Olo Source

Pull closed orders from Olo's Order Export into a Lens table, one row per order or one row per product, dated by each store's local business day.

Before you start

  • Olo Order Export credentials with Signature Authorization enabled: the Client ID and Client Secret from your Olo Developer Portal project.
  • Set it up early. Olo keeps each closed-order batch for 30 days. The first sync loads every batch Olo still holds, so history starts about 30 days before the first sync. From then on Lens keeps every batch it has read, even after Olo expires it.

Add the Olo connection

  1. Go to Security & Access and add a connection.
  2. Choose Olo (Order Export Signature Auth).
  3. Enter a Connection Name, the Client ID and the Client Secret.
  4. Set Environment to Production, or Sandbox for Olo's test environment.
  5. Click Save Connection.

Create the table

  1. Go to Configure > Data Tables, click + New Table, and choose Olo (Order Export).
  2. Enter a Table Name, such as "Orders by Store".
  3. Pick the Olo Connection.
Or use a Recommended Setup

Recommended Setups on Configure > Data Tables has an Olo card that creates the standard Olo tables in one step.

Choose the grain

Olo orders are nested: one order holds many products. Grain decides how they land as flat rows. The columns are fixed for each grain.

GrainOne row isUse it for
Order level (one row per order)An orderRevenue, average order value, tax, tip, handoff mix, store performance
Line-item level (one row per product)A product on an orderProduct mix. Order totals are left out so adding up line items never counts an order twice

You can change the grain later. Lens rebuilds the rows from the orders it has already stored, so history is not lost.

Order-level columns

DimensionsMetrics
store_name, store_ref, handoff, source, ordering_provider, is_guest, coupon_code, delivery_state, delivery_zip, client_platformsubtotal, discount, tax, tip, delivery_fee, custom_fee_total, donations_total, total, order_count, item_count

Line-item columns

DimensionsMetrics
store_name, store_ref, handoff, source, product_name, product_pos_refquantity, base_cost, line_total, line_count

line_total is the base cost times the quantity. Both grains also carry the time columns below.

How orders are dated

Each order is dated by the store's local business day, from the time the order was placed (or closed, if no placed time is sent). "Orders yesterday by store" means yesterday on each store's own clock, even when your stores sit in different time zones.

ColumnHolds
store_local_timeThe store's local date and time of the order
store_local_hourThe hour of that local time, 00 to 23
store_utc_offsetThe store's offset from UTC when the order was placed, such as -5
time_basisutc when the order carried a UTC offset; store_local_unconverted when it did not, so its exact moment in UTC is unknown

Lens never guesses a store's time zone. See Dates and Time Zones.

Set the sync mode and schedule

Each sync pulls any new closed-order batches Olo has generated, keeps the raw orders, and turns them into rows.

Sync ModeWhat it does
Incremental (default)Adds rows only from newly pulled batches
Full RefreshRebuilds the table from every batch Lens has stored

Pick a Sync Schedule and click Create Table.

Check it worked

When the table is active, pick one store and one recent day, and compare the order count and total sales with the same store and day in Olo. Compare on the store's local day.

Troubleshooting

What you seeWhat to do
Saving says an Olo connection is requiredCreate the connection under Security & Access first, then click the refresh button beside Olo Connection
The sync fails saying no Olo batch files are availableOlo has not generated a batch yet, or every batch has passed Olo's 30-day window. Wait for Olo's next batch and sync again
The sync fails with a credentials errorCheck the Client ID, Client Secret and Environment on the connection, and that Signature Authorization is enabled on the Olo project
A line-item table has no order totals, tax or tipThat is by design, so line items never double-count an order. Use an order-level table for revenue and order counts