Skip to content

Pool: Site Script Variants Missing When Legal Address Is Also Site Main Address #1698

@nicoprow

Description

@nicoprow

Summary

When a business partner is created where the legal address also serves as the site main address (LegalAndSiteMainAddress address type), the resulting site in the Pool is missing its site name script variant information, even though the golden record task data contained it.

Affected Component

BPDM PoolTaskStepBuildService / BusinessPartnerBuildService

Steps to Reproduce

1. Upload Business Partner Input to Gate

PUT /v7/input/business-partners

Provide a business partner input with the address type set to LegalAndSiteMainAddress and include site name script variant information in the site payload. The legalEntity.legalAddress.addressType must be LegalAndSiteMainAddress. The site field must be filled with a name. The scriptVariants list must contain at least one entry with a non-null site.name (e.g. for script code Latn).

2. Wait for Gate to Create the Orchestrator Task

After uploading, the Gate creates a golden record task in the Orchestrator. Poll the sharing state until it transitions to Pending:

POST /v7/input/business-partners/sharing-state/search

Search by the externalId of the record uploaded in step 1 and retrieve the taskId from the response.

3. Reserve the Golden Record Task

POST /v7/business-partners/golden-record-tasks/step-reservations

Reserve the task so it can be processed. The response contains the task's business partner data, which includes both the site header data and its script variants.

4. Post Golden Record Task Result with Site Script Variants

POST /v7/business-partners/golden-record-tasks/step-results

Resolve the reserved task with a result payload that contains:

  • site.siteName set to the site name
  • site.scriptVariants containing at least one entry with a non-null and non-empty siteName (e.g. for script code Latn)
  • site.siteMainAddress set to null (because the main address is the legal address, indicated by the BPN reference of legalEntity.legalAddress matching site.siteMainAddress.bpnReference)

5. Verify the Site in the Pool

After the sharing state reaches Success, retrieve the site from the Pool:

GET /v7/sites/{bpns}

Expected: The response contains a non-empty scriptVariants list where each entry includes both the site name and the main address postal variants for the corresponding script code.

Actual: The scriptVariants list in the site response is empty. All site name script variant data is lost.

Impact

Any site whose address type is LegalAndSiteMainAddress will be stored in the Pool without site name script variants, regardless of what the enrichment service (e.g. Cleaning Service Dummy) provides in the golden record task result. This silently discards multilingual/script-variant data for sites in the most common company data setup (own company data where the registered address serves as both the legal and site main address).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions