> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcemedium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fospha - Integration Instructions

> Connect Fospha cross-channel measurement and incrementality data to SourceMedium.

## Follow this integration guide to connect your Fospha data to SourceMedium.

Fospha is a marketing measurement platform. It ingests your ad-platform spend plus its own site and conversion signal, re-attributes conversions and revenue across channels, and exposes the result through its Export API. SourceMedium syncs that output so Fospha's re-attributed view sits beside the numbers each ad platform reports for itself.

<Note>
  Fospha is a measurement source, not an ad platform. It does not replace your Meta, Google, or TikTok connectors. Every row lands with the Fospha attribution next to the ad platform's own figure and a last-click baseline, which is the comparison this integration exists to give you.
</Note>

### What you need

Fospha issues these to you. Ask your Fospha account manager, Customer Success Manager, or Fospha Support for all of them in one thread, then pass them to SourceMedium.

<Warning>
  **Fospha requires three values, not two.** Fospha uses the word "client" for two unrelated things, and this is the most common way to get stuck. The application credentials alone will mint a valid token and still fail every query.
</Warning>

| Value                               | What it identifies                            | Shape                         |
| ----------------------------------- | --------------------------------------------- | ----------------------------- |
| `app_client_id`                     | The API application                           | About 25 characters           |
| `app_client_secret`                 | The same application                          | About 50 characters           |
| **Fospha client ID for your brand** | **Your Fospha account**, whose data to return | Short, for example `f0cacc1a` |

The first two mint an access token. The third tells Fospha whose data to return, and Fospha issues it **separately** from the credential pair. Fospha's own documentation lists it as a distinct prerequisite:

> "Before you begin, ensure you have: the Fospha client ID for your brand; a valid access token. If you do not have the Fospha client ID yet, please contact Fospha support."
>
> Fospha, [Retrieve data](https://api-docs.uk.fospha.com/guides/retrieve-data)

You also need to confirm two settings, because neither can be discovered reliably and both change the numbers:

* **Your Fospha region**, US or UK. These are separate deployments and credentials only work against the right one.
* **Your reporting currency.** Fospha's API returns EUR when no currency is specified, so confirm the currency your Fospha account reports in.

### How to connect

<Info>
  This integration is set up with help from SourceMedium rather than in the self-serve picker. To enable it, reach out to your account manager or [integrations@sourcemedium.com](mailto:integrations@sourcemedium.com).
</Info>

<Steps>
  <Step title="Request all three values from Fospha">
    Ask your Fospha account manager, CSM, or Fospha Support for the `app_client_id`, the `app_client_secret`, **and** the Fospha client ID for your brand. Name the third one explicitly. The credential pair is often sent on its own, because two values genuinely are enough to authenticate, so "we have the client ID and secret" is a common but incomplete answer.

    While you are in that thread, it helps to also ask how far back Fospha restates attributed conversions and revenue, and what timezone its daily reporting date is bucketed in.
  </Step>

  <Step title="Send the values to SourceMedium">
    Send all three, plus your region and reporting currency, to your account manager or [integrations@sourcemedium.com](mailto:integrations@sourcemedium.com), not in a public channel. Our team stores them in SourceMedium's connection manager, the same secure store used for every API-key integration.
  </Step>

  <Step title="SourceMedium validates and backfills">
    We confirm the three values work together against your account, check the currency on real rows before trusting any of them, load your available history, and put the connection on its regular sync.
  </Step>
</Steps>

<Note>
  SourceMedium only ever reads from your connected platforms. It does not create, change, or delete anything, so create the key with **read-only** access wherever the platform offers it. Treat it like a password: keep it confidential and avoid sharing it over email or in spreadsheets. If the credential is rotated or revoked, follow this guide's connection method to update SourceMedium.
</Note>

### What data syncs

| Data                      | Description                                                                                                                        |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Re-attributed performance | Daily, at ad grain. Spend, Fospha-attributed conversions and revenue, and the platform-reported and last-click figures beside them |
| Saturation and headroom   | Fospha's incrementality model output per channel, including saturation point and remaining spend headroom                          |
| Reporting readiness       | A record of Fospha's own pipeline runs, so data freshness can be measured rather than assumed                                      |

Every row records the currency it is denominated in, so a figure can always be traced back to its unit.

### Reading the data correctly

<Warning>
  **Recent days are incomplete, by design.** A Fospha date is not settled the next day, even after Fospha's own daily pipeline reports complete. Measured on a live account, the previous day held about a third of its eventual spend while every older day sat within a few percent of normal. Treat roughly the last three to four days as still filling in, and compare on settled windows.
</Warning>

* **Fospha restates history.** As conversions move between channels, a past date's rows change, and some disappear entirely. SourceMedium rewrites the affected window on each sync rather than merging, so what you see always matches Fospha's current view rather than an accumulation of old ones.
* **Fospha attribution will not match platform-reported numbers, and that is the point.** Re-attribution moves credit between channels. Use the platform-reported and last-click columns that land alongside it when you need the comparison.
* Fospha covers marketing measurement only. Order, customer, and catalog data come from your commerce platform integration.

### Troubleshooting

* **"Access denied: invalid client credentials"?** This almost always means the Fospha client ID for your brand is wrong or missing, not that the credential pair is bad. Fospha returns the same message for both, but if a token was issued at all then the application credentials are provably fine. Check the brand client ID before asking anyone to rotate a secret.
* **Authentication fails outright?** Confirm which region your Fospha account is on. The wrong region rejects a perfectly good credential in a way that looks identical to a bad one.
* **Numbers look plausible but wrong, roughly by an exchange rate?** Confirm your reporting currency with SourceMedium. Fospha returns EUR when no currency is specified, which produces well-formed, entirely incorrect figures with no error anywhere.
* **A recent day looks low?** See the note above on settling. Check whether the date is inside the last few days before treating it as a real drop.
