Emarsys "Invalid choice id for field id: 31" sync error fix
"Invalid choice id for field id: 31" means Emarsys received a value for a single-choice field that isn't one of that field's numeric choice IDs. Look up the field's choices in Emarsys, then send the matching ID (for example 1 or 2) instead of text like "yes" or "true".
Sohail Hussain7 min readShort answer
- The error means Emarsys received a value for field 31 that is not one of that field's allowed choice IDs. Single-choice fields take the numeric ID of an option, not its label.
- Look up the choice IDs for field 31 in your Emarsys account, then make sure the value your Wisepops lead sends for that field is the matching number, such as 1 or 2.
Your Wisepops leads are not showing up in Emarsys, and the Sync Emarsys column in the lead export says:
Invalid choice id for field id: 31
That column shows the raw API response for each lead. Wisepops documents the connection in its help article on syncing leads with Emarsys; use it alongside this page for the exact mapping screens.
Why it happens
Emarsys stores contacts as numbered fields. Each field has an ID, and single-choice fields (dropdown-like fields) have a fixed list of options, each with its own numeric ID. When a contact is pushed, the field ID is the key, and the value for a choice field must be one of those option IDs.
The message has two parts:
field id: 31is the field that was rejected.Invalid choice idsays the value sent is not in that field's list of options.
This is a rejection from Emarsys, not a Wisepops outage. The integration passed along what it was given. In a default Emarsys account, field 31 is commonly the system opt-in field, where 1 means true and 2 means false. Your account can differ, so confirm it before relying on that.
The causes, most common first:
| Cause | What you see in the CSV | Fix |
|---|---|---|
| Label or text sent instead of an ID | Value like Yes, true, on | Store the choice ID as the option value |
| Empty value on a mapped choice field | Blank value for the field | Make the field required, or stop mapping it |
| Wrong field mapped to ID 31 | A value that belongs to another question | Correct the mapping |
| Choice list changed in Emarsys | Value that used to work is now rejected | Update the IDs in Wisepops |
| Custom field with its own IDs | IDs copied from a different field | Look up that field's own choices |
Confirm which field 31 is in your account
- In Emarsys, open the field management area (search for "Field Management" in the admin settings).
- Find the field with ID 31 and note its name and type.
- Open its list of choices and write down each option with its ID.
You can also ask the API. GET /api/v2/field/31/choice returns the choices for that field, with an ID and display text for each. GET /api/v2/field/translate/en lists all fields with their IDs, which helps if the error names a different field number.
Fix the value Wisepops sends
1. Check the field mapping
Open the Emarsys integration settings in Wisepops and confirm field 31 is mapped to the field you intended. A wrong mapping can send, for example, a consent answer or a free-text answer to the wrong Emarsys field.
2. Compare the failing value with the choice IDs
- Open the failing row in the exported CSV.
- Read the value for the mapped field.
- Compare it with the choice IDs you wrote down.
If it is text, a label or an empty string, you have found the cause.
3. Send the ID, not the label
Where the Wisepops field is a dropdown, radio or checkbox group, set the stored value of each option to the Emarsys choice ID (for example 1). The visitor still sees the friendly label. I have not verified exactly where Wisepops exposes that setting, so check its article or ask Wisepops support.
For reference, this is the shape of a payload Emarsys accepts, with field 3 as email and field 31 as a choice ID:
{
"keyId": "3",
"contacts": [
{ "3": "jane@example.com", "31": "1" }
]
}
Do not fake consent
Field 31 often controls whether you may email the contact. Only map it to a checkbox that is real consent; if you are unsure, a double opt-in flow is safer.
4. If you cannot change the stored value
Stop mapping that field and set the value another way, such as an Emarsys-side import or rule. I would do that rather than push free text into a choice field. Our glossary entry on double opt-in explains the consent side if the field is an opt-in.
5. Test, then recover the failed leads
- Submit a test lead through the popup.
- Open its Sync Emarsys column. A successful sync no longer shows the error.
- Handle the leads that already failed. Whether Wisepops retries failed leads on its own is not something I can confirm, so ask Wisepops support. Otherwise, export the failed rows, correct the value, and import them into Emarsys.
The same error on other fields
The number after "field id" changes with whichever field failed; the cause and fix do not. Look up that field's choices, then send the ID. Custom single-choice fields you created have their own IDs and option lists, so the IDs you wrote down for field 31 will not transfer. If a field accepts multiple choices, check how Emarsys documents that field type before mapping it.
Checklist before you try again
- Field 31 is mapped to the field you meant.
- You have the list of choice IDs from Emarsys for that field.
- The value stored for each Wisepops option is a choice ID, not a label.
- The mapped field is never sent empty.
- A test lead shows a clean Sync Emarsys response.
Preventing it
- Keep a small mapping sheet: Wisepops field, Emarsys field ID, and the allowed choice IDs.
- Re-check it whenever someone edits a choice list in Emarsys; adding or removing options changes what is valid.
- Test a lead after each change to the popup form or the mapping.
If nothing works
If the values match the IDs and the error continues, contact Wisepops support first, since they control what is sent. If the choice list looks wrong or field 31 is not what you expect, ask Emarsys support to confirm the field's type and choice IDs in your account. Include the CSV row, the exact text from Sync Emarsys, the lead's timestamp, and what you already tried.
Subject: Emarsys sync error "Invalid choice id for field id: 31"
Hello,
Leads from my Wisepops popup fail to sync to Emarsys. The Sync Emarsys
column in the lead export shows:
Invalid choice id for field id: 31
Example lead timestamp: {date and time, with timezone}
Value sent for the field: {value from the CSV row}
Allowed choice IDs for field 31 in my account: {IDs you looked up}
I have checked the field mapping and tried sending the numeric choice ID.
Can you confirm what value is being sent for this field, and whether
failed leads can be retried?
Thank you
Common questions
Is this an Emarsys problem or a Wisepops problem?
The rejection comes from Emarsys, but the wrong value usually originates in the Wisepops form or mapping. Fix the value first; contact Emarsys only if the choice list itself looks wrong.
Is field 31 always the opt-in field?
No. It is commonly the system opt-in field in a default account, but your account can differ. Check the field's name and type in Emarsys before assuming.
Will failed leads sync again automatically?
I cannot confirm that Wisepops retries them. Ask Wisepops support, or export the failed rows and import them into Emarsys with corrected values.
Can I send the label if it matches the option text?
Not for a choice field. Emarsys expects the numeric option ID, so a matching label is still rejected.
Explore: Email Marketing Strategy
Related Articles
ActiveCampaign n8n error 301 on create contact: causes and fixes
A 301 from the ActiveCampaign node means the request went to a URL that redirects, so start with the API URL in your n8n credential. Copy it from Settings, then Developer, and check the scheme and path. Zapier 403 and cURL error 28 behind Cloudflare have different causes, covered below.
"Stage not on allowlist": Apollo to HubSpot sync fix
The error "Stage not on allowlist" means the contact's Apollo stage is not on the list of stages permitted to push to HubSpot. Open the HubSpot integration in Apollo, go to the Sync tab, and add that stage under "Stages for push contacts". Lifecycle stage mapping is a separate setting.
Salesmate "Authorization with Gmail failed": Gmail IMAP fix
Salesmate shows "Authorization with Gmail failed" when it can't read your Gmail account over IMAP. In Gmail settings, enable IMAP, choose "Do not limit the number of messages in an IMAP folder", and show All Mail in IMAP. Then reconnect the account in Salesmate. Other causes are covered below.
AWeber export "Stop Status" and "Stop Time" columns explained
In an AWeber subscriber export, a non-empty Stop Time and a non-zero Stop Status most likely mean the person has stopped receiving your mail, usually because they unsubscribed. AWeber doesn't explain the columns in the file, so verify against a few known unsubscribes, then import those rows as blocked, not subscribed.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free