You seem to be mixing two different IDs here:
ContactID
in the context of Marketing Cloud is an integer
Id
of an Account object which is a string in the format of 001+15characters
If the ContactID
you have stored in your DE is a number, it's the MC Contact ID and it's natural you will not find any matching records of the Account object with the same value in the Id
field.
In out of the box integration the MC-type ContactID is not stored in Sales / Service Cloud, so this might be kind of a dead end if you can only rely on an integer Contact ID
You would be much better off using a Marketing Cloud Subscriber Key
or Contact Key
which in standard integrations using MC Connect represents the ID of the Contact object in a Salesforce org. This type of ID uses the 003+15characters
format.
In a person account setup, this value is stored on the PersonContactID
field in Sales Cloud.
Updated based on OP's comment:
In your original code we see you retrieving the store information from the Account object where it's named Store__pc
. The __pc
suffix means that for this PersonAccount this particular field was created on the level of the PersonContact (pc), so you actually have two ways of retrieving this information through ampscript:
From the Account object:
RetrieveSalesforceObjects(
"Account",
"Store__pc",
"PersonContactID", "=", @Id)
The 003...
ID is stored in the PersonContactID field
From the Contact object:
RetrieveSalesforceObjects(
"Contact",
"Store__c",
"Id", "=", @Id)
The 003...
ID is the ID of the Contact and since you are retrieving the field data from the object to which the field belongs, you need to use Store__c
instead of Store__pc