Skip to main content

Company & Seller Mapping

Every survey response DQC receives is a transaction between two companies:

  • the company that hosts the survey (usually you), and
  • the seller — the supplier/panel that fills the survey with respondents (e.g. PureSpectrum, SAGO).

DQC needs them for every respondent. This page has two parts: your Company (one static value) and the Seller (three ways to identify it).

Finding company records

DQC identifies companies by a canonical name/code. Use the Company Names and Codes search tool to look up the exact records. If a name you send doesn't match, DQC won't drop it silently — it's flagged so we can follow up and map it correctly.

Escape special characters in names

The names you type here sit inside a Python string in an <exec> block, which Decipher parses as XML. A literal &, <, or > in a company or seller name will break the survey. When you hand-type a name that contains one, replace it with its XML entity:

CharacterType this instead
&&amp;
<&lt;
>&gt;

For example, Smith & Jones becomes:

addDQCField("buyerName", lambda: "Smith &amp; Jones")

The interactive builder in Full Examples escapes these for you automatically — this only matters when you edit the XML by hand.


Company (the survey host)

This is your company — the one hosting the survey. It's almost always the same, so you set it once as a static value in buyerName:

Company (static)
addDQCField("buyerName", lambda: "Your company name")   # the company hosting the survey

That's the only option here — the host company doesn't change from respondent to respondent. Because it's always your company, you can reuse the same buyerName across all of your surveys.


Seller (the supplier)

The seller is the company that supplied the respondent — the panel/supplier the person came through. This can change per respondent, so there are three ways to identify it. Pick whichever fits how you work.

A seller is required

Every response must identify its seller — send it via one of the three options below.

Option 1 — Static seller name

If you only ever work with one supplier, hard-code it:

Seller (static)
addDQCField("sellerName", lambda: "PureSpectrum")
Copying a survey? Update it

A static seller only fits when every respondent in this survey comes from one supplier. If you copy this script into a survey that uses a different supplier, remember to change sellerName — a leftover value misattributes the seller.

Option 2 — Map by sample source (list)

When respondents arrive from several suppliers, each one enters through a sample source you define in your survey's <samplesources> block. Decipher then exposes which source a respondent used via the list value in the entry URL (?list=2). For example, a survey with three sources:

Your survey's sample sources
<samplesources default="0">
<samplesource list="0"><title>Open Survey</title> ... </samplesource>
<samplesource list="1"><title>PureSpectrum</title> ... </samplesource>
<samplesource list="2"><title>SAGO</title> ... </samplesource>
</samplesources>

The list value is just a number, so you build a dictionary with one entry per sample source above — the same list values — mapping each to its supplier name. The script resolves the current respondent's supplier and sends the name:

Seller (build-list mapping)
# One entry per <samplesource list="N"> in your survey.
dqcVlist = {
"0": "Acme Panel", # matches <samplesource list="0">
"1": "PureSpectrum", # matches <samplesource list="1">
"2": "SAGO", # matches <samplesource list="2">
}

addDQCField("source", lambda: list) # raw list value (traceability)
addDQCField("sellerName", lambda: dqcVlist.get(str(list).strip(), ""))
Map every source — including the default (usually 0)

Every <samplesource list="N"> in your survey needs a matching key in dqcVlist, and it's easy to forget the default source — the one Decipher uses when a respondent arrives with no list in the URL, usually 0. If a list value has no matching key, sellerName comes back empty, and DQC rejects a response with no seller. So make sure every source, the default included, maps to a supplier name.

Option 3 — Supplier index (your own IDs)

If you already track your suppliers in your own system — each with a stable id/index — send that identifier instead of a name. Because the index is stable, the same value always refers to the same supplier, so DQC recognizes it consistently across responses:

Seller (supplier index)
addDQCField("supplierIndex", lambda: "123")     # the supplier's stable id/index in YOUR system
addDQCField("supplierName", lambda: "Your supplier name") # optional — send it too if you have it

Use this when your platform assigns every supplier a unique id/index. You can send just supplierIndex, or both supplierIndex and supplierName.

Share your index → company mapping with DQC first

Because you're sending an index instead of a name, DQC can't tell which supplier each index refers to on its own. Before you go live you must share your internal index → company-name mapping with the DQC team so we can resolve each index to the right company on our end. This step is required for this option. It's a good approach when you'd rather not send company names directly — but only if your indexes are standardized consistently across all your surveys, so the same index always means the same supplier.


Combining Company + Seller

A typical setup: a static buyerName (your company) plus a build-list sellerName (the supplier):

Company + seller together
dqcVlist = { "0": "Acme Panel", "1": "PureSpectrum", "2": "SAGO" }

addDQCField("buyerName", lambda: "Acme Research")
addDQCField("source", lambda: list)
addDQCField("sellerName", lambda: dqcVlist.get(str(list).strip(), ""))

If seller values disagree or can't be matched, DQC flags the mismatch for follow-up rather than dropping the respondent.


✅ Summary

  • Every response is a Company (host) → Seller (supplier) transaction; DQC needs both.
  • Company — one static value, buyerName (the company hosting the survey).
  • Seller (required) — three options: static sellerName, a list → supplier build-list map, or a supplierIndex (your own stable id, optionally with supplierName).
  • Map every sample source, including 0 — an unmapped list value resolves to Unknown and gets flagged.
  • Look up exact company records with the Company Names and Codes tool.