RocketChat/Rocket.Chat · warning

Some custom fields were not processed

Error message

Some custom fields were not processed

What it means

While processing an omnichannel visitor's custom fields, Rocket.Chat matched the submitted keys against the Livechat custom fields defined in settings; validCustomFields ended up shorter than the submitted keys, so at least one key had no matching definition. Undefined keys are skipped and the missingKeys list in the log shows exactly which ones.

Source

Thrown at apps/meteor/server/lib/omnichannel/custom-fields.ts:148

				prev[`livechatData.${curr.key}`] = curr.value;
			}

			return prev;
		},
		{} as Record<string, string>,
	);

	if (Object.keys(visitorCustomFieldsToUpdate).length) {
		await LivechatVisitors.updateAllLivechatDataByToken(visitor.token, visitorCustomFieldsToUpdate);
	}

	const contacts = await LivechatContacts.findAllByVisitorId(visitor._id).toArray();
	if (contacts.length) {
		await Promise.all(contacts.map((contact) => updateContactsCustomFields(contact, validCustomFields)));
	}

	if (validCustomFields.length !== keys.length) {
		livechatLogger.warn({
			msg: 'Some custom fields were not processed',
			visitorId: visitor._id,
			missingKeys: keys.filter((key) => !validCustomFields.map((v) => v.key).includes(key)),
		});
	}

	return true;
}

export async function setMultipleCustomFields({
	visitor,
	customFields,
}: {
	visitor: ILivechatVisitor;
	customFields: {
		key: string;
		value: string;
		overwrite: boolean;

View on GitHub (pinned to 2a7de45707)

Solutions

  1. Read missingKeys from the log entry — those exact keys are undefined
  2. Create each missing field in Administration > Omnichannel > Custom Fields using the identical key/name
  3. Or fix/stop sending the stale key from the website script or integration payload
  4. Match key names exactly, including casing and underscores

Example fix

// before
// API sends: { customFields: { departement: 'sales' } }
// Custom Fields has key: 'department'

// after
// API sends: { customFields: { department: 'sales' } }
Defensive patterns

Strategy: validation

Validate before calling

const definedKeys = new Set((await LivechatCustomField.find({}, { fields: { _id: 1 } }).fetch()).map((f) => f._id));
const unknown = Object.keys(submittedCustomFields).filter((key) => !definedKeys.has(key));
if (unknown.length) {
  throw new Meteor.Error('invalid-custom-fields', `Unknown custom fields: ${unknown.join(', ')}`);
}

Prevention

When it happens

Trigger: A visitor registration / page-visited / custom-field API call sends 'customFields' containing keys that are not defined in Administration > Omnichannel > Custom Fields — typo, casing mismatch, or a field that was never created.

Common situations: Website widget script sending fields the admin never configured; a field renamed or removed server-side while the website still posts the old key; integrations built against a different workspace's field set.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@2a7de45707 (2026-08-18). Data as JSON: /api/errors/a9f78c952f9d17c0. Report an issue: GitHub.