Skip to main content

What is the Bucket integration?

The Bucket integration is the integration method for enterprise operations that already centralize their data in a data warehouse (e.g. BigQuery). Instead of using a native integration or the API, the client periodically exports sales data and journey events (web and app) to a cloud bucket (AWS S3 or Google Cloud Storage), and Nemu reads these files directly from there.

Bucket access

Nemu creates a dedicated IAM role for the client and shares its ARN (e.g. arn:aws:iam::<nemu-account>:role/<client>-s3-bucket-access). The client then:
  1. Grants read access to this role on the bucket (bucket policy);
  2. Confirms the bucket name, folder (prefix) and region (e.g. us-east-1) with Nemu.
Alternatively, the client can create the role on their side and share access with Nemu.

File format

The format used is NDJSON (one JSON object per line): it represents nested structures (such as the products list) without ambiguity and is natively exported by BigQuery.
Sending CSV files is possible, but the file layout must be validated with Nemu before sending starts.
In NDJSON the value type matters: numbers go without quotes (e.g. "campaign_id": 120210948573, "netValue": 699.99) and text goes with quotes (e.g. "content": "CARROSSEL_1080x1080"). In CSV everything is text, and Nemu converts it based on the field type in the mapping. If the type is wrong (e.g. a number sent as text), the mapping flags it before importing.

Folder structure in the bucket

Inside the agreed prefix, organize files by journey and by date. The journey folders are sales/ (sales) and events/ (journey events):
Nemu runs the imports automatically, during off-peak hours. You don’t need to schedule anything.

Sales schema

Each record represents an order (or one order per seller, in the case of marketplaces, see Multi-seller). products[] is optional, but if sent it must have at least 1 item.

Example

An order with two products:
Order with two products

Order fields

Product fields (products[])

Multi-seller (marketplaces)

For marketplace operations, each child order (per seller) is sent as its own record, linked to the “parent” order by the fields: The parent order doesn’t need to be sent or have its own status: the status comes in each child, and Nemu groups by parentOrderId, adding or subtracting each child according to its status (delivered counts, cancelled or returned is removed). These fields are optional: if you’re not a marketplace, simply don’t send parentOrderId. In the example below, order 155480144 has items from two sellers and is sent as two child orders:
Child order 1
Child order 2
In the NDJSON file, each of these records takes up a single line. The formatting above is just for readability.
Sub-orders of the same parent order can have different statuses (e.g. one seller paid and another cancelled). Send the actual status of each sub-order.

Journey events schema

Journey events (web and app) follow the GA4/BigQuery export standard. Each record represents one event. user_pseudo_id is almost always present; user_id only when the user has logged in. transaction_id ties the purchase event to the sale.

Example

A purchase event with full attribution:
purchase event

Event fields

The transaction_id of the purchase event must be the same transactionId sent in the sales file. It’s what connects the browsing journey to the sale inside Nemu.

Configuring UTMs

In this integration, UTM configuration does not follow Nemu’s standard onboarding. Since the utm_source, utm_medium, utm_campaign and utm_content fields are usually already in use by the client’s GA4 and can’t be changed, all of Nemu’s attribution (source, campaign, ad set and creative) is packed into a single utm_term, which GA4 captures and passes on to Nemu. See the step-by-step guide per platform (Meta, Google and TikTok) in Configuring UTMs.

Validation checklist

After the files start being sent, the client and Nemu validate the data loaded on the platform together:
  1. Payment methods: all of the client’s methods are correctly mapped to billet, credit_card, pix or others;
  2. Revenue: net (netValue) and gross (grossValue) revenue values match the client’s platform;
  3. Products: name, quantity and values of each product are correct;
  4. Orders: transactionId and revenue of each order match;
  5. UTMs: utm_term is arriving in Nemu’s packed attribution format (see Configuring UTMs).
The integration is only considered complete after every checklist item has been validated by both sides. Revenue discrepancies or payment mapping issues must be fixed at the source (the client’s export) before go-live.