# Known Build Gotchas — Customer 360: M&A Consolidation

A few non-obvious errors you may hit while Companion builds the Integration and DataHub
components for this lab, each with its root cause and the fix. Keep this file in the folder you
point Companion at — if it stumbles on one of these, the fix is right here.

---

## Combine Documents rejects per-record docs: "Input document does not match combine source profile"

**When it shows up:** Building the BetaCorp structured onboarding process. A map splits the
Dynamics CSV into one `<customergolden360>` document per row, and a Data Process **Combine
Documents** step is set to merge them into a single `<batch>` envelope using the batch XML
profile (root `<batch>`, repeating child `customergolden360`).

**Error (on the Data Process step during a test run):**

```
Error executing data process; Caused by: failed storing payload;
Caused by: Input document does not match combine source profile
```

**Root cause:** `Combine Documents` validates each **incoming** document against the *root
element* of the profile you give it. The incoming docs are per-record — root
`<customergolden360>` — but the profile's root is `<batch>`. Root mismatch, so the step rejects
the input. Native Combine is designed to recombine documents that were previously **split** from
that same profile (matching root), not to wrap child-level records inside a new parent envelope.

**Fix:** Replace `Combine Documents` (and any follow-on `Search/Replace` that injects the `src`
attribute) with a single **Custom Scripting (Groovy)** Data Process step that assembles the
envelope directly — loop over `dataContext.getDataCount()`, strip each doc's XML declaration,
concatenate inside `<batch src="BETACORP"> … </batch>`, and `storeStream` once after the loop
(one combined output document). Wrapping N child docs in a parent envelope is exactly the case
native Combine can't do.

**Rule of thumb:** `Combine Documents` only works when the incoming documents already match the
target profile's root. To turn many child records into one parent-wrapped document, use a small
Groovy script (or map the repeating source straight to the wrapper profile in one pass if you
don't need to filter individual records first).

---

## Flat File profile: `textQualifier="doublequote"` is rejected on create (HTTP 400)

**When it shows up:** Creating the CSV flat-file profiles (`profile.flatfile`) for the Dynamics
and SAP feeds with a double-quote text qualifier.

**Error (component create):**

```
cvc-enumeration-valid: Value 'doublequote' is not facet-valid with respect to enumeration
'[na, textqualifierdouble, textqualifiersingle]'.
```

**Root cause:** `doublequote` is not a valid schema value. The valid values are `na`,
`textqualifierdouble`, and `textqualifiersingle`. (Some connector reference examples show
`doublequote` — that value does not pass component validation.)

**Fix:** Use `textQualifier="textqualifierdouble"` (or `textqualifiersingle` for single-quote).

---

## CLI scripts expect `BOOMI_API_TOKEN` and `BOOMI_API_URL`

**When it shows up:** Running the Integration or DataHub CLI scripts against your account.

**Root cause:** If your `.env` stores the platform token only as `BOOMI_TOKEN` and has no
`BOOMI_API_URL`, the CLI scripts can't authenticate — they look specifically for
`BOOMI_API_TOKEN` and `BOOMI_API_URL`.

**Fix:** Add both to your `.env` (alias the token you already have):

```
BOOMI_API_URL=https://api.boomi.com
BOOMI_API_TOKEN=<same value as BOOMI_TOKEN>
```
