Symptom
After creating a Lead for a non-existing Account and later assigning an existing Account to it, a new Prospect is getting created when using action 'Associate Account and Contact' functionality.
Environment
SAP Cloud for Customer
Reproducing the Issue
-
Go to the Sales work center.
- Open the Leads view.
- Open the Lead ABC (where ABC stands for ID of a Lead eligible for associating an Account and Contact).
- Click in the Actions button.
- Select Associate Account and Contact.
- Fill in the needed fields in the Associate Account and Contact pop-up.
- Select existing Account in Use existing account field.
- Click on save and open.
- See the Lead is getting created with existing account.
- Go to Customers > Accounts.
- Search for the Company name entered (e.g. 'SAP Test Company').
- See this was created as a prospect, even though the Lead was associated with an existing account later.
Cause
When a Lead is initially saved without selecting an existing account, C4C instantly generates an independent, Active Prospect record in the database. If you later change the account pointer field inside that Lead to point to an existing customer, the Lead updates perfectly. However, the system purposely avoids auto-deleting or altering master data, leaving the original Prospect intact and active.
Resolution
This is the expected system behavior.
The Best Practice: From a data hygiene perspective, swapping accounts inside an active Lead is discouraged. If a Lead was created under the wrong account, the cleanest method is to set that Lead to "Insolvent" or "Lost" and create a new one using the "Use Existing Account" checkbox.
- Automated Cleanup (No Code): Your administrator can schedule an Automated Business Partner End of Purpose Run via the Data Protection and Privacy work center to periodically find unlinked prospects with no transactional history and set them to Obsolete in bulk.
- Real-Time Fix (SDK/PDI Script): A developer can add a simple script to the Lead - BeforeSave event to automatically flag the old prospect record as obsolete in real-time when a user changes the account link.
See Also
2650937 - Lead Associate Account And Contact Creates Prospect If No Account Is Selected
Keywords
Lead management; Account association; Prospect creation; Duplicate accounts; Master data hygiene; Business partner role; Unlinked lead; SAP C4C architecture; Data cleansing; Account re-assignment; Stray records; Orphaned prospect; Work list clutter; Database persistence; Data integrity; C4C workflow limitation; Cross-BO logic; Flag as obsolete; End of purpose run; PDI SDK script; Use existing account; Quick create validation; Lead lifecycle; Cloud application studio , KBA , LOD-CRM-LM , Lead Management , How To
SAP Knowledge Base Article - Public