Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cegid Retail Y2 fields mapping

The customer create and update lifecycle, and the default field mapping between The Wallet Crew and Cegid Retail Y2, including its conditions.

The connector creates and updates customer records in Cegid Retail Y2 from enrolment forms, and reads them back to populate passes and pre-fill forms. This page documents that lifecycle and the field mapping applied by default.

The create and update lifecycle

When an enrolment form is submitted, the connector maps the submitted data onto the Cegid customer structure, applies the brand's own mapping script if one is deployed, and writes the record. It then reads the record back from Cegid rather than assuming the write took effect as sent, which is why values normalized or rejected by Cegid are reflected immediately rather than at the next read.

Finding an existing customer

Where a pass already carries a Cegid customer identifier, that identifier is used directly. Where it does not, the connector searches Cegid to avoid creating a duplicate.

That search runs in parallel across the email address and, for the telephone number, several formats — as entered, with the international prefix in either notation, and in national form — each checked against the four telephone fields a Cegid record carries. Closed records are excluded.

Default field mapping

The mapping below is applied before any mapping script runs. Almost every field is conditional, and the conditions are the source of most reported surprises: a field that appears not to map is usually a field whose condition was not met.

The Wallet Crew field
Cegid field
Conditions and transformation

email

EmailData.Email

Always written.

phoneNumber

PhoneData.CellularPhoneNumber

Written when present.

firstName

FirstName

Always written.

lastName

LastName

Mandatory in Cegid. If blank on update, re-fetched from Cegid; if still blank, set to the literal NEOSTORE. On read, a last name of NEOSTORE is suppressed.

sex

Sex

Only M or F are accepted. Any other value is written as empty.

title

TitleId

Written when present.

advisor, else advisorId

SalesPersonId

The first of the two that is present.

storeId

UsualStoreId

Written when present. On read, falls back to the store of creation when the store of attachment is empty.

isProspect

IsProspect

Always written, defaulting to false.

birthDate

BirthDateData

Day and month accepted when greater than zero; year only when after 1900 and not in the future. If all three are present but do not form a valid past date, the whole birth date is cleared.

address

AddressData.AddressLine1

Always written.

streetNumber

AddressData.AddressLine2

Always written.

postCode, else zipCode

AddressData.ZipCode

The first of the two that is present. Read back into postCode.

city

AddressData.City

Always written.

country

AddressData.CountryId

Only written when the value is exactly two characters, and then as an ISO-2 code. Anything else is discarded with a warning. On read, Cegid's own identifier is converted back to ISO-2.

nationality

NationalityId

Written when present.

consents_email

OptinEmail and EmailData.EmailingAccepted

Written only when an email address is present. True becomes brand-only consent, false becomes do-not-use.

consents_sms

OptinMobile

Written only when a mobile number is present.

consents_post

OptinPostal

Written only when an address line, city, or postcode is present.

consents_emailReceipt

EmailData.SendReceiptByMail

Written only when an email address is present.

lastUpdated

LastModificationDate

Read only.

Reading back into a form

The same mapping applies in reverse when a customer is loaded, to pre-fill an edit form or to populate a pass. Empty Cegid values are not written over existing wallet values, and two sentinel values are filtered: a last name of NEOSTORE, and a birth year of 1900 or zero, which Cegid uses to mean unset.

Extending the mapping

Everything beyond standard identity and contact fields is set through a mapping script: see Customize the mapping. The structure of the Cegid customer object a script works with is in the Scripting reference.

The structure of the Cegid customer object, as documented by Cegid, shows the exact property to read or write in a custom mapping script. The main properties are:

Property
Type
Content

AddressData

AddressDataType

AddressLine1, AddressLine2, AddressLine3, BrandName, City, CountryId, CountryIdType (Internal, ISO2, ISO3 or ISO3Numeric), Nata, RegionId, ZipCode.

EmailData

EmailDataType

AlternativeEmail, Email, EmailingAccepted, SendReceiptByMail.

PhoneData

PhoneDataType

AlternativePhoneNumber, CellularPhoneNumber, HomePhoneNumber, OfficePhoneNumber.

FirstName, LastName, AlternateFirstName, AlternateLastName

string

Customer names.

TitleId, SalesPersonId, SalesPerson2Id, SalesPerson3Id

string

Customer title and sellers.

IsCompany

boolean

Whether the customer is a company.

LastModificationDate

dateTime

Date of last change, available in read-only mode.

UserDefinedBooleans, UserDefinedDates, UserDefinedTexts

arrays

User-defined values, each identified by an Id from 1 to 3.

UserDefinedData

UserDefinedDataType

UserDefinedTable0Value to UserDefinedTable9Value.

ActivitySectorCode, BusinessAreaCode, CpfCnpjCode, MunicipalRegistration, OriginCode, PriceListCode, RegionalRegistration, RiskLevel

string

Optional classification and registration codes.

BirthDateData

BirthDateDataType

BirthDateDay, BirthDateMonth, BirthDateYear (each an int).

OptinEmail, OptinAlternativeEmail, OptinMobile, OptinHomePhone, OptinOfficePhone, OptinPostal

CustomerInformationType

Consent per channel: AskCustomer, BrandOnly, ForPartners or DoNotUse.

ValidEmail, ValidAlternativeEmail, ValidMobile, ValidHomePhone, ValidOfficePhone

boolean

Whether the email address or phone number is valid.

UserFields

array of UserField

Each user field has an Id, a ValueType (BooleanValueKind, TextValueKind, DateValueKind, ListElementValueKind or NumberValueKind) and its value in the matching property (BooleanValue, TextValue, DateValue, ListElementValue or NumberValue).

CustomerId, CustomerGuid, UsualStoreId, Barcode, LanguageId, NationalityId, CurrencyId, Sex, ShortName, LongDescription, Notepad, PassportNumber, CompanyIdNumber, CompanyTitleId, FiscalId, ItalianFiscalId, VATSystem, ActivityCode, InvoiceCustomerId

string

Other identity, profile and fiscal properties. CustomerId is assigned automatically when it is not specified and automatic assignment is enabled in the default store settings.

Closed, IsProspect, DirectMail

boolean

Whether the customer is closed, whether the customer is a prospect, and mail merge (DirectMail).

FAQ

Why is a customer's country missing in Cegid?

The country value was not exactly two characters. The connector writes ISO-2 codes only, and discards anything else rather than sending a value Cegid would reject.

Why does a customer have the last name NEOSTORE?

The prefix NEOSTORE is the platform's former name, kept in this literal. Cegid requires a last name. Where a form allows it to be empty and no existing value can be recovered, that placeholder is written so the record can be created at all. It is hidden when read back, but visible in Cegid. Making the field mandatory on the form avoids it.

Are consents overwritten on every update?

Only where the corresponding contact detail is present on the submission. A brand that manages consent primarily in Cegid should confirm which fields the enrolment form submits, since a form that carries a consent value will write it.

Last updated