Provider Bulk Sync
Mappings
OneKey to Salesforce Mapping
This page describes how IQVIA OneKey fields map to Salesforce objects during Provider Bulk Sync. Use it to understand Individual, Workplace, and Activity field mappings, including transformations and filters.
Everything below is the out-of-the-box mapping that ships with the connector and applies to every record by default. It is a single generic mapping, not per country. To change what is mapped, add code-value translations, or apply per-country rules, see the Extend Connector guide; you make those changes in the mappingTemplates/download files of the OneKey System API, not in the flows.
Individual Mapping
This section shows how OneKey Individual (HCP) records map to Salesforce objects.
A OneKey Individual represents a single healthcare professional. Each record carries the person's profile (name, gender, title, birth year, status) along with related education, languages, NPIs, specialties, business licenses, addresses, phones, and relations to other HCPs. These map to the Salesforce Person Account and its related records, each detailed in the subsections below: Account, PersonEducation, PersonLanguage, HealthcareProvider, HealthcareProviderNpi, CareSpecialty, HealthcareProviderSpecialty, BusinessLicense, ContactPointAddress, ContactPointPhone, and ProviderAffiliation.
Source DWL: individualMapper.dwl. Functions: ind_base_mapping, ind_language_mapping, ind_hcp_mapping, ind_hcp_npi_mapping, ind_person_education_mapping, ind_care_specialty_mapping, ind_healthcare_specialty_mapping, ind_business_license_mapping, ind_address_mapping, ind_relations_mapping.
Account Entity
These fields map OneKey Individual data to the Salesforce Person Account.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.individualEid | Yes | Yes | External upsert key (ExternalFieldValue = okid); e.g. "WFR123" | Record skipped entirely if the OneKey ID is empty |
| LastName | individual.lastName | No | No | Direct mapping. "Doe" → "Doe" | Written only if(!isEmpty(record.lastName)) |
| FirstName | individual.firstName | No | No | Direct mapping. "John" → "John" | Written only if(!isEmpty(record.firstName)) |
| PersonGender | individual.genderCode | Yes | No | Code→value translation, Code "GEN": "M"→"Male", "F"→"Female" | Written only if(!isEmpty(record.genderCode)) |
| PersonTitle | individual.titleLabel | No | No | Direct mapping. "Dr." → "Dr." | Written only if(!isEmpty(record.titleLabel)) |
| PersonMobilePhone | individual.telephones[typeCode=="1",rank==1].callNumberForDisplay | No | No | Direct mapping of selected number (default null) | filter typeCode=="1" and rank==1 → primary mobile number |
| PersonHomePhone | individual.telephones[typeCode=="1",rank==2].callNumberForDisplay | No | No | Direct mapping of selected number (default null) | filter typeCode=="1" and rank==2 → secondary (home) number |
| Fax | individual.telephones[typeCode=="2",rank==1].callNumberForDisplay | No | No | Direct mapping of selected number (default null) | filter typeCode=="2" and rank==1 → primary fax number |
| PersonBirthdate | individual.birthYear | Yes | No | Appends "-01-01" to the year. "1980" → "1980-01-01" | Written only if(!isEmpty(record.birthYear)) |
| IsActive | individual.statusCode | Yes | Yes | Boolean derivation: !(statusCode == INACTIVE_STATUS_CODE). "9" → false; "3" → true | None |
| RecordTypeId | config sfOrg.personAccountRecordId (not from OneKey) | Yes | Yes | Constant from config = Person Account record type ID | None |
PersonEducation Entity
These fields map education (study-diploma) ADA entries on the Individual to PersonEducation records.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| Identifier | individual.ada[].code (okid + code) | Yes | Yes | Concatenation okid ++ "_" ++ item.code. "WFR123","MD" → "WFR123_MD" | filter listCode=="SD" and !isEmpty(code) → education (study-diploma) ada only; block skipped if none |
| HealthcareProviderId | HCP reference (okid) | Yes | Yes | Reference link "@{ref_HealthcareProvider_<okid>.id}" → HCP Id | per-education item |
| Name | individual.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code. e.g. label missing, code "MD" → "MD" | per-education item |
| IdentifierIssuer | individual.ada[].codeLabel | No | No | Direct mapping | Written only if(!isEmpty(item.codeLabel)) |
| GraduationDate | individual.ada[].thesisYear | No | No | Direct mapping | Written only if(!isEmpty(item.thesisYear)) |
| ProgramName | individual.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-education item |
| EducationLevel | individual.ada[].code | No | Yes | Direct mapping | per-education item |
| IsActive | individual.ada[]._isDeleted_ | Yes | Yes | Boolean: !(!isEmpty(_isDeleted_) and _isDeleted_). deleted → false | per-education item |
| Status | derived from education active flag | Yes | Yes | Conditional: active → "Verified" else "Inactive" | per-education item |
PersonLanguage Entity
These fields map the Individual's preferred language to a PersonLanguage record when a preferred language is present.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.individualEid (okid) | No | No | External upsert key = okid (direct) | Whole block only created if(!isEmpty(individual.preferredLanguageEID)) |
| IndividualId | Account reference (okid) | Yes | No | Reference link "@{ref_Account_<okid>.id}" → Account Id | Block only if preferredLanguageEID not empty |
| Language | individual.preferredLanguageEID | Yes | No | Code→value translation, Code "WLN": "en"→"English" | Block only if preferredLanguageEID not empty |
| Rank | constant 1 | Yes | No | Constant value 1 (rank defaulted to 1) | Block only if preferredLanguageEID not empty |
HealthcareProvider Entity
These fields map the OneKey Individual to the related HealthcareProvider record.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.individualEid (okid) | No | Yes | External upsert key = okid (direct) | None |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | None |
| Name | individual.firstName, individual.lastName | Yes | No | If firstName present firstName ++ " " ++ lastName else lastName. "John","Doe" → "John Doe" | Written only if(!isEmpty(record.lastName)) |
| SourceSystemModifiedDate | individual.updateDate | No | No | Direct mapping | Written only if(!isEmpty(record.updateDate)) |
| ProfessionalTitle | individual.titleCode | Yes | No | Code→value translation, Code "TIT" via referCodesMapping service | Written only if(!isEmpty(record.titleCode)) |
| IsPrivacyLawEnabled | record.isPrivacyLaw (sibling of individual) | No | No | Direct mapping of boolean | Written only if(!isEmpty(isPrivacyLaw)) |
| Status | individual.statusCode | Yes | No | Code→value translation, Code "STA": "0"→"Pending", "3"→"Active", "9"→"Inactive" | Written only if(!isEmpty(record.statusCode)) |
| IsPrimaryProvider | constant true | Yes | Yes | Constant true (default) | None |
| IsActive | individual.statusCode | Yes | Yes | Boolean derivation: !(statusCode == INACTIVE_STATUS_CODE). "9" → false | None |
| ProviderType | individual.typeCode | Yes | No | Code→value translation, Code "TYP": "MX"→"Medical Assistant", "P"→"Pharmacist", "D"→"Dentist" | Written only if(!isEmpty(record.typeCode)) |
HealthcareProviderNpi Entity
These fields map the Individual's primary NPI external key to HealthcareProviderNpi.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.externalKeys[].value (okid + value) | Yes | Yes | Concatenation okid ++ "_" ++ item.value. "IND123","1234567890" → "IND123_1234567890" | filter typeCode=="NPI" and number ~= 1 → primary NPI external key only; block skipped if no NPI |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-NPI item |
| NpiType | constant "Individual" (SALESFORCE_NPI_TYPE) | Yes | Yes | Constant "Individual" | per-NPI item |
| Name | individual.externalKeys[].value | No | Yes | Direct mapping of NPI value | per-NPI item |
| Npi | individual.externalKeys[].value | Yes | Yes | Conditional: if record statusCode == INACTIVE → "" else item.value. Active "1234567890" → "1234567890"; inactive → "" | per-NPI item; blanked when individual inactive |
| AccountNpiType | constant "Type1" (SALESFORCE_NPI_ACCOUNT_TYPE) | Yes | Yes | Constant "Type1" | per-NPI item |
| IsActive | individual.externalKeys[]._isDeleted_ / .statusCode | Yes | Yes | Boolean: if _isDeleted_ present !_isDeleted_ else !(statusCode == INACTIVE) | per-NPI item |
CareSpecialty Entity
These fields upsert CareSpecialty master data from the Individual's specialty ADA codes.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SpecialtyCode | individual.ada[].code | Yes | Yes | External key = item.code (direct; no CodeValues for IND_SP_CODE) | filter listCode=="SP" and !isEmpty(code) → specialty ada only. masterData (upserted once) |
| Name | individual.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
| SpecialtyType | individual.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
HealthcareProviderSpecialty Entity
These fields link the Individual Account to CareSpecialty master records through HealthcareProviderSpecialty.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.ada[].code (okid + code) | Yes | Yes | Concatenation okid ++ "_" ++ item.code | filter listCode=="SP" and !isEmpty(code); distinctBy ExternalFieldValue → dedupe specialty links |
| SpecialtyId | CareSpecialty master reference (item.code) | Yes | Yes | Reference link "@{md_CareSpecialty_<code>}" → CareSpecialty Id | per-specialty item |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-specialty item |
| Name | individual.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
| IsActive | individual.ada[]._isDeleted_ | Yes | Yes | Boolean: !(!isEmpty(_isDeleted_) and _isDeleted_) | per-specialty item |
| Rank | individual.ada[].rank | No | No | Direct mapping | Written only if(!isEmpty(item.rank)) |
BusinessLicense Entity
These fields map accepted OneKey license external keys to BusinessLicense records.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| Identifier | individual.externalKeys[].value (value + okid) | Yes | Yes | Concatenation item.value ++ "_" ++ okid | ACCEPTED_LICENSES contains typeCode and !isEmpty(value) → only configured/accepted license types; distinctBy ExternalFieldValue → dedupe |
| Name | individual.externalKeys[].value | No | Yes | Direct mapping | per-license item |
| LicenseNumber | individual.externalKeys[].value | No | Yes | Direct mapping | per-license item |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-license item |
| HealthcareProviderId | HCP reference (okid) | Yes | Yes | Reference link "@{ref_HealthcareProvider_<okid>.id}" → HCP Id | per-license item |
| SourceSystemUpdateDate | individual.externalKeys[].updateDate | No | No | Direct mapping | Written only if(!isEmpty(item.updateDate)) |
| LicenseClass | individual.externalKeys[].typeCode (+ typeCorporateLabel) | Yes | No | Concatenation: typeCode ++ " - " ++ typeCorporateLabel (label optional). "DEA","State License" → "DEA - State License" | Written only if(!isEmpty(item.typeCode)) |
| Status | individual.externalKeys[].statusCode | Yes | No | Code→value translation, Code "STA": "0"→"Draft", "3"→"Verified", "9"→"Inactive" | Written only if(!isEmpty(item.statusCode)) |
| ContactPointAddressId | individual.externalKeys[].addresses[rank==1].address.addressEid | Yes | No | Reference link "@{ref_ContactPointAddress_<okid>_lic_<addressEid>}.id" → license address Id | Written only if(!isEmpty(item.address) and !isEmpty(addresses filter rank==1)) |
| ComplianceScope | individual.externalKeys[].typeCode | Yes | No | Code→value translation, Code "LIC": "DEA"→"Address", "SLN"→"JurisdictionState", "OH_TDDD"→"StateDistributorLicense" | Written only if(mapComplianceScope(typeCode)) i.e. typeCode ∈ LICENSES_WITH_COMPLIANCE_SCOPE |
| IsActive | individual.externalKeys[]._isDeleted_ / .statusCode | Yes | Yes | isActive(item): if _isDeleted_ present !_isDeleted_ else !(statusCode == INACTIVE) | per-license item |
ContactPointAddress Entity
These fields map Individual addresses (including unmatched license addresses) to ContactPointAddress.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | individual.individualAddresses[].address.addressEid (okid + eid) | Yes | Yes | Concatenation okid ++ "_" ++ address.addressEid | Block skipped if no addresses. (Also invoked with key "lic" for unmatched license addresses) |
| ParentId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-address item |
| Name | individual.individualAddresses[].address.addressShortLabel / .addressEid | Yes | Yes | addressShortLabel default addressEid | per-address item |
| IsPrimary | individual.individualAddresses[].rank, .typeCode | Yes | No | Boolean derivation: (rank == 1) and (typeCode == "P") | Written only if(!isEmpty(item.rank)) |
| City | individual.individualAddresses[].address.postalTownReference.villageLabel | No | No | Direct mapping | Written only if(!isEmpty(villageLabel)) |
| StateCode | individual...postalTownReference.subdivisions[subdivisionType=="SUB.3"][0].longLocalizedLabel | No | No | Direct mapping of selected label | filter subdivisionType=="SUB.3" → state/department subdivision level |
| PostalCode | individual.individualAddresses[].address.longPostalCode | No | No | Direct mapping | Written only if(!isEmpty(longPostalCode)) |
| Street | individual.individualAddresses[].address.addressLongLabel | No | No | Direct mapping | Written only if(!isEmpty(addressLongLabel)) |
| Longitude | individual...address.geocodingAddresses[geoCodingSystemCode=="W"][0].longitude | No | No | Direct mapping of selected value | filter geoCodingSystemCode=="W" → WGS geocoding system only |
| Latitude | individual...address.geocodingAddresses[geoCodingSystemCode=="W"][0].latitude | No | No | Direct mapping of selected value | filter geoCodingSystemCode=="W" → WGS geocoding system only |
| CountryCode | individual...address.postalTownReference.country | No | No | Direct mapping | Written only if(!isEmpty(country)) |
| ContactPointPhoneId | individual.individualAddresses[].telephones[rank==1]._isDelete_ | Yes | No | Conditional reference: if _isDelete_ → null else "@{ref_ContactPointPhone_<eid>_<key>_<okid>.id}" | Written only if telephones present and (number present or _isDelete_) |
| IsActive | individual.individualAddresses[]._isDeleted_ | Yes | Yes | Boolean: !(!isEmpty(_isDeleted_) and _isDeleted_) | per-address item |
ContactPointPhone Entity
These fields map the primary telephone on each Individual address to ContactPointPhone.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| TelephoneNumber | individual.individualAddresses[].telephones[rank==1].callNumberForDisplay | No | No | Direct mapping of selected number | filter rank==1 → primary phone of the address; record (Method POST) only created if number present |
| IsPrimary | constant true | Yes | No | Constant true | Created only when a primary telephone number exists |
ProviderAffiliation Entity
These fields map Individual relation records to soft ProviderAffiliation links.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| attributes | constant { "type": "ProviderAffiliation" } | Yes | Yes | Constant Composite-API type marker; stripped from entities, kept in compositeRequests.relations | Block skipped if no relations |
| SourceSystemIdentifier | individual.relations[].onekeyEid, .linkCode | Yes | Yes | Concatenation okid ++ "_" ++ onekeyEid ++ "_" ++ (linkCode default "0") | per-relation item |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-relation item |
| RelatedAccountId | individual.relations[].onekeyEid | Yes | Yes | Reference link "@{ref_RelatedAccount_<onekeyEid>.id}" → related Account Id | per-relation item |
| AffiliationType | constant "Soft" (SALESFORCE_SOFT_AFFILIATION_TYPE) | Yes | Yes | Constant "Soft" (all individual relations treated as soft) | per-relation item |
| Role | individual.relations[].linkCode | Yes | Yes | Code→value translation, Code "TIH" via referCodesMapping service | per-relation item |
| EffectiveStartDate | individual.relations[].beginValidDate | No | No | Direct mapping | Written only if(!isEmpty(item.beginValidDate)) |
| EffectiveEndDate | individual.relations[].endValidDate | No | No | Direct mapping | Written only if(!isEmpty(endValidDate) and year != 9999) → excludes 9999 (open-ended) sentinel |
| IsPrimary | constant false | Yes | Yes | Constant false (primary relations only arrive via activity) | per-relation item |
| InfluenceType | constant "Unidirectional" | Yes | Yes | Constant "Unidirectional" | per-relation item |
| IsActive | individual.relations[]._isDeleted_ / .statusCode | Yes | Yes | isActive(item): if _isDeleted_ present !_isDeleted_ else !(statusCode == INACTIVE) | per-relation item |
Workplace Mapping
This section shows how OneKey Workplace (HCO) records map to Salesforce objects.
A OneKey Workplace represents a single healthcare organization, such as a hospital, clinic, or pharmacy. Each record carries the organization's profile (name, type, status, sector, licensed beds) along with related NPIs, specialties, business licenses, addresses, phones, opening hours, and relations to other HCOs. These map to the Salesforce Business Account and its related records, each detailed in the subsections below: Account, HealthcareProvider, HealthcareProviderNpi, CareSpecialty, HealthcareProviderSpecialty, BusinessLicense, ContactPointAddress, ContactPointPhone, ContactPointBestContactTime, and ProviderAffiliation.
Source DWL: workplaceMapper.dwl. Functions: wkp_base_mapping, wkp_hcp_mapping, wkp_hcp_npi_mapping, wkp_care_specialty_mapping, wkp_healthcare_specialty_mapping, wkp_business_license_mapping, wkp_address_mapping, wkp_relations_mapping, wkp_address_open_hour_mapping.
Account Entity
These fields map OneKey Workplace data to the Salesforce Business Account.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.workplaceEid (Bulk: default workplace.onekeyEid) | No | Yes | Direct mapping of the resolved okid (external upsert key, ExternalFieldValue). "WKP123" → "WKP123". okid resolution applies a Bulk-path default workplace.onekeyEid fallback upstream | Record skipped entirely if okid empty |
| Industry | workplace.ada[listCode=='PPA',rank~=1][0].value | No | No | Direct mapping of selected value | filter listCode=='PPA' and rank ~= 1 → primary sector-1 (PPA) code |
| Phone | workplace.telephones[typeCode=="1",rank==1].callNumberForDisplay | No | No | Direct mapping of selected number (default null) | filter typeCode=="1" and rank==1 → primary fixed line (var named telMobile, mapped to Phone) |
| Fax | workplace.telephones[typeCode=="2",rank==1].callNumberForDisplay | No | No | Direct mapping of selected number (default null) | filter typeCode=="2" and rank==1 → primary fax |
| Name | workplace.usualName | No | No | Direct mapping | Written only if(!isEmpty(workplace.usualName)) |
| IsActive | workplace.statusCode | Yes | Yes | Boolean derivation: !(statusCode == INACTIVE_STATUS_CODE). "9" → false | None |
| RecordTypeId | config sfOrg.businessAccountRecordId (not from OneKey) | Yes | Yes | Constant from config = Business Account record type ID | None |
HealthcareProvider Entity
These fields map the OneKey Workplace to the related HealthcareProvider record (the HCO's HealthcareFacility view).
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.workplaceEid (okid) | No | Yes | External upsert key = okid (direct) | None |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | None |
| SourceSystemModifiedDate | workplace.updateDate | No | No | Direct mapping | Written only if(!isEmpty(workplace.updateDate)) |
| Status | workplace.statusCode | Yes | No | Code→value translation, Code "STA": "0"→"Pending", "3"→"Active", "9"→"Inactive" | Written only if(!isEmpty(workplace.statusCode)) |
| TotalLicensedBeds | workplace.bedFacts[type=="TO",subType=="LIC_BED"][0].bedNumber | No | No | Direct mapping of selected bed number | filter type=="TO" and subType=="LIC_BED" → licensed-bed total fact |
| OperatingCountryCode | workplace.workplaceAddresses[typeCode=='P',rank!=1][0].address.postalTownReference.country | No | No | Direct mapping of selected country | filter typeCode=='P' and rank != 1 → non-primary postal address country |
| SourceSystem | constant "OneKey" | Yes | Yes | Constant "OneKey" | None |
| Name | workplace.usualName | No | No | Direct mapping (HCP.Name) | Written only if(!isEmpty(workplace.usualName)) |
| IsPrimaryProvider | constant true | Yes | Yes | Constant true (default) | None |
| IsActive | workplace.statusCode | Yes | Yes | Boolean derivation: !(statusCode == INACTIVE_STATUS_CODE) | None |
| ProviderType | workplace.typeCode | Yes | No | Code→value translation, Code "TET": "22"→"Hospital", "39"→"Pharmacy", "30"→"Laboratory" | Written only if(!isEmpty(workplace.typeCode)) |
| ProviderClass | workplace.activityLocationCode | Yes | No | Code→value translation, Code "LEX": "H"→"Hospital", "F"→"Pharmacy", "O"→"Laboratory" | Written only if(!isEmpty(workplace.activityLocationCode)) |
HealthcareProviderNpi Entity
These fields map the Workplace's primary NPI external key to HealthcareProviderNpi.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.externalKeys[].value (okid + value) | Yes | Yes | Concatenation okid ++ "_" ++ item.value | filter typeCode=="NPI" and number ~= 1 → primary NPI key; block skipped if no NPI |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-NPI item |
| NpiType | constant "Organization" (SALESFORCE_NPI_TYPE) | Yes | Yes | Constant "Organization" | per-NPI item |
| Name | workplace.externalKeys[].value | No | Yes | Direct mapping of NPI value | per-NPI item |
| Npi | workplace.externalKeys[].value | Yes | Yes | Conditional: if record statusCode == INACTIVE → "" else item.value | per-NPI item; blanked when workplace inactive |
| AccountNpiType | constant "Type2" (SALESFORCE_NPI_ACCOUNT_TYPE) | Yes | Yes | Constant "Type2" | per-NPI item |
| IsActive | workplace.externalKeys[]._isDeleted_ / .statusCode | Yes | Yes | isActive(item): if _isDeleted_ present !_isDeleted_ else !(statusCode == INACTIVE) | per-NPI item |
CareSpecialty Entity
These fields upsert CareSpecialty master data from the Workplace's specialty ADA codes.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SpecialtyCode | workplace.ada[].code | No | Yes | External key = item.code (direct; no CodeValues for WKP_SP_CODE) | filter listCode=="SP" and !isEmpty(code) → specialty ada only. masterData |
| Name | workplace.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
| SpecialtyType | workplace.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
HealthcareProviderSpecialty Entity
These fields link the Workplace Account to CareSpecialty master records through HealthcareProviderSpecialty.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.ada[].code (okid + code) | Yes | Yes | Concatenation okid ++ "_" ++ item.code | filter listCode=="SP" and !isEmpty(code); distinctBy ExternalFieldValue → dedupe |
| SpecialtyId | CareSpecialty master reference (item.code) | Yes | Yes | Reference link "@{md_CareSpecialty_<code>}" → CareSpecialty Id | per-specialty item |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-specialty item |
| Name | workplace.ada[].codeCorporateLabel / .code | Yes | Yes | codeCorporateLabel default code | per-specialty item |
| IsActive | workplace.ada[]._isDeleted_ | Yes | Yes | Boolean: !(!isEmpty(_isDeleted_) and _isDeleted_) | per-specialty item |
| Rank | workplace.ada[].rank | No | No | Direct mapping | Written only if(!isEmpty(item.rank)) |
BusinessLicense Entity
These fields map accepted OneKey Workplace license external keys to BusinessLicense records.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| Identifier | workplace.externalKeys[].value (value + okid) | Yes | Yes | Concatenation item.value ++ "_" ++ okid | ACCEPTED_LICENSES contains typeCode and !isEmpty(value) → accepted license types only; distinctBy ExternalFieldValue → dedupe |
| Name | workplace.externalKeys[].value | No | Yes | Direct mapping | per-license item |
| LicenseNumber | workplace.externalKeys[].value | No | Yes | Direct mapping | per-license item |
| LicenseClass | workplace.externalKeys[].typeCode (+ typeCorporateLabel) | Yes | No | Concatenation typeCode ++ " - " ++ typeCorporateLabel (label optional) | Written only if(!isEmpty(item.typeCode)) |
| Status | workplace.externalKeys[].statusCode | Yes | No | Code→value translation, Code "STA": "0"→"Pending", "3"→"Active", "9"→"Inactive" | Written only if(!isEmpty(item.statusCode)) |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-license item |
| PeriodStart | workplace.externalKeys[].issuedDate | No | No | Direct mapping | Written only if(!isEmpty(item.issuedDate)) |
| PeriodEnd | workplace.externalKeys[].expirationDate | Yes | No | Conditional: if == "4000-12-31T23:59:59Z" → "4000-12-31T00:00:00Z" else passthrough | Written only if(!isEmpty(item.expirationDate)) → normalises OneKey "never expires" sentinel |
| Issuer | workplace.externalKeys[].entityName | No | No | Direct mapping | Written only if(!isEmpty(item.entityName)) |
| ContactPointAddressId | workplace.externalKeys[].addresses[rank~=1][0].address.addressEid | Yes | No | Reference link "@{ref_ContactPointAddress_<okid>_lic_<addressEid>.id}" → license address Id | Written only if(!isEmpty(item.address) and addresses[rank~=1] present) |
| ComplianceScope | workplace.externalKeys[].typeCode | Yes | No | Code→value translation, Code "LIC": "DEA"→"Address", "SLN"→"JurisdictionState", "OH_TDDD"→"StateDistributorLicense" | Written only if(mapComplianceScope(typeCode)) i.e. typeCode ∈ LICENSES_WITH_COMPLIANCE_SCOPE |
| IsActive | workplace.externalKeys[]._isDeleted_ / .statusCode | Yes | Yes | isActive(item) boolean | per-license item |
ContactPointAddress Entity
These fields map Workplace addresses (including unmatched license addresses) to ContactPointAddress.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.workplaceAddresses[].address.addressEid (okid + eid) | Yes | Yes | Concatenation okid ++ "_" ++ address.addressEid | Block skipped if no addresses. (Also invoked with key "lic" for unmatched license addresses) |
| Name | workplace.workplaceAddresses[].address.addressShortLabel / .addressEid | Yes | Yes | addressShortLabel default addressEid | per-address item |
| ParentId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-address item |
| IsPrimary | workplace.workplaceAddresses[].typeCode, .rank | Yes | Yes | Boolean derivation: (typeCode == "P" and rank == 1) (always written, unlike Individual) | per-address item |
| City | workplace.workplaceAddresses[].address.postalTownReference.villageLabel | No | No | Direct mapping | Written only if(!isEmpty(villageLabel)) |
| StateCode | workplace...postalTownReference.subdivisions[subdivisionType=='SUB.3'][0].longLocalizedLabel | No | No | Direct mapping of selected label | filter subdivisionType=='SUB.3' → state/department subdivision level |
| PostalCode | workplace.workplaceAddresses[].address.longPostalCode | No | No | Direct mapping | Written only if(!isEmpty(longPostalCode)) |
| Street | workplace.workplaceAddresses[].address.addressLongLabel | No | No | Direct mapping | Written only if(!isEmpty(addressLongLabel)) |
| Longitude | workplace...address.geocodingAddresses[geoCodingSystemCode=="W"][0].longitude | No | No | Direct mapping of selected value | filter geoCodingSystemCode=="W" → WGS geocoding system |
| Latitude | workplace...address.geocodingAddresses[geoCodingSystemCode=="W"][0].latitude | No | No | Direct mapping of selected value | filter geoCodingSystemCode=="W" → WGS geocoding system |
| CountryCode | workplace...address.postalTownReference.country | No | No | Direct mapping | Written only if(!isEmpty(country)) |
| ContactPointPhoneId | workplace.workplaceAddresses[].telephones[rank==1]._isDelete_ | Yes | No | Conditional reference: if _isDelete_ → null else "@{ref_ContactPointPhone_<eid>_<key>_<okid>.id}" | Written only if telephones present and (number present or _isDelete_) |
| IsActive | workplace.workplaceAddresses[]._isDeleted_ | Yes | Yes | Boolean: !(!isEmpty(_isDeleted_) and _isDeleted_) | per-address item |
ContactPointPhone Entity
These fields map the primary telephone on each Workplace address to ContactPointPhone.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| TelephoneNumber | workplace.workplaceAddresses[].telephones[rank==1].callNumberForDisplay | No | No | Direct mapping of selected number | filter rank==1 → primary phone of the address; record (Method POST) only created if number present |
| IsPrimary | constant true | Yes | No | Constant true | Created only when a primary telephone number exists |
ContactPointBestContactTime Entity
These fields map Workplace opening hours across each address to ContactPointBestContactTime.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| SourceSystemIdentifier | workplace.openingHours[] + workplaceAddresses[].address.addressEid | Yes | Yes | Concatenation okid ++ "_" ++ (addressEid ++ daySlotRank ++ weekDay ++ timeSlotRank) | Cross-product of each address x each opening-hour; addresses validated to have address.addressEid |
| Name | workplace.openingHours[].weekDayLabel, workplaceAddresses[].address.addressShortLabel | Yes | No | Substring + concat: weekDayLabel[0 to 2] ++ "-" ++ (addressShortLabel default uniqueId). "Monday" → "Mon-<label>" | Written only if(!isEmpty(weekDayLabel)) and record not deleted |
| ContactPointReferenceId | ContactPointAddress reference (addressEid) | Yes | Yes | Reference link "@{ref_ContactPointAddress_<okid>_<key>_<addressEid>.id}" → address Id | non-deleted records |
| FromTime | workplace.openingHours[].openingTime | Yes | No | getTime() reformats to HH:mm. "0900" → "09:00"; "2400" → "00:00". See note below for full logic. | Written only if(!isEmpty(openingTime)) and record not deleted |
| ToTime | workplace.openingHours[].closingTime | Yes | No | getTime() reformats to HH:mm (same logic as FromTime). "1730" → "17:30" | Written only if(!isEmpty(closingTime)) and record not deleted |
| DayOfWeek | workplace.openingHours[].weekDayLabel | Yes | No | capitalize(). "monday" → "Monday" | Written only if(!isEmpty(weekDayLabel)) and record not deleted |
| IsActive | workplace.openingHours[]._isDeleted_ | Yes | Yes | true when not deleted; if _isDeleted_ the record collapses to only IsActive: false | per opening-hour item |
Note on FromTime / ToTime: getTime() left-pads the input to 4 digits, splits into HH and MM, and reformats to HH:mm. If minutes are >= 60 it rolls minutes into hours; "2400" normalises to "00:00". Any unparseable input falls through to "unexpectedFormat".
ProviderAffiliation Entity
These fields map Workplace relation records to ProviderAffiliation, with hierarchy-driven Hard/Soft classification.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| attributes | constant { "type": "ProviderAffiliation" } | Yes | Yes | Constant Composite-API type marker; stripped from entities, kept in compositeRequests.relations | Block skipped if no relations |
| SourceSystemIdentifier | workplace.relations[].onekeyEid, .linkCode | Yes | Yes | Concatenation okid ++ "_" ++ onekeyEid ++ "_" ++ (linkCode default "0") | per-relation item |
| AccountId | Account reference (okid) | Yes | Yes | Reference link "@{ref_Account_<okid>.id}" → Account Id | per-relation item |
| RelatedAccountId | workplace.relations[].onekeyEid | Yes | Yes | Reference link "@{ref_RelatedAccount_<onekeyEid>.id}" → related Account Id | per-relation item |
| AffiliationType | workplace.relations[].linkCode, record.country | Yes | Yes | Conditional: isHierarchyType(linkCode,country) → "Hard" else "Soft" | Hierarchy link-codes from config onekey.download.workplaceHierarchy.<country> (else .default) |
| Role | workplace.relations[].linkCode | Yes | Yes | Code→value translation, Code "TIH" via referCodesMapping service | per-relation item |
| EffectiveStartDate | workplace.relations[].beginValidDate | No | No | Direct mapping | Written only if(!isEmpty(item.beginValidDate)) |
| EffectiveEndDate | workplace.relations[].endValidDate | No | No | Direct mapping | Written only if(!isEmpty(endValidDate) and year != 9999) → excludes 9999 sentinel |
| IsPrimary | constant false | Yes | Yes | Constant false (hard-coded) | per-relation item |
| IsParent | workplace.relations[].isParent | No | No | Direct mapping | Written only when sendParentFlag is true (Search-Download path; false for Bulk) |
| InfluenceType | constant "Unidirectional" | Yes | Yes | Constant "Unidirectional" | per-relation item |
| IsActive | workplace.relations[]._isDeleted_ / .statusCode | Yes | Yes | isActive(item) boolean | per-relation item |
Activity Mapping
This section shows how OneKey Activity records map to ProviderAffiliation (the HCP to Workplace activity link).
Source DWL: activityMapper.dwl. Functions: activity_base_mapping. okid = activity.activityEid (Bulk: default record.onekeyEid).
ProviderAffiliation Entity
These fields map the Activity (HCP to Workplace link) to a hard ProviderAffiliation record.
| Salesforce Field | IQVIA OneKey Fields | Transformation | Mandatory | Transformation with Example | Filters |
|---|---|---|---|---|---|
| attributes | constant { "type": "ProviderAffiliation" } | Yes | Yes | Constant Composite-API type marker; stripped from entities ($ - "ACT_AFFILIATION_ATTRIBUTES"), kept in compositeRequests.payload | None |
| SourceSystemIdentifier | activity.activityEid (Bulk: default record.onekeyEid) | No | Yes | Direct mapping of the resolved okid (ACT_AFFILIATION_ID). "ACT123" → "ACT123". okid resolution applies a Bulk-path default record.onekeyEid fallback upstream | Record skipped entirely if okid empty |
| AccountId | activity.individualEid | Yes | Yes | Reference link "@{ref_RelatedAccount_<individualEid>.id}" → individual's Account Id | None |
| RelatedAccountId | activity.workplaceEid | Yes | Yes | Reference link "@{ref_RelatedAccount_<workplaceEid>.id}" → workplace's Account Id | None |
| AffiliationType | constant "Hard" | Yes | Yes | Constant "Hard" (activity affiliations hard-coded to Hard) | None |
| Role | activity.ada[listCode=="TIH"][0].code | Yes | Yes | Role derived from ada then Code→value translation, Code "TIH" via referCodesMapping. null when no role resolved | filter listCode=="TIH" → title-in-hierarchy role code; role is null when activity.ada is not an Array OR when no ada entry has listCode=="TIH" (empty filter selected by [0]) |
| EffectiveStartDate | activity.activityStartDate | No | No | Direct mapping | Written only if(!isEmpty(activity.activityStartDate)) |
| EffectiveEndDate | activity.activityEndDate | No | No | Direct mapping | Written only if(!isEmpty(activityEndDate) and year != 9999) → excludes 9999 sentinel |
| IsPrimary | activity.isMainActivity | No | No | Direct mapping of boolean | Written only if(!isEmpty(activity.isMainActivity)) |
| InfluenceType | constant "Unidirectional" | Yes | Yes | Constant "Unidirectional" | None |
| IsActive | activity.statusCode | Yes | Yes | Boolean derivation: !(statusCode == INACTIVE_STATUS_CODE). "9" → false | None |