How to pull an record type object data to SFMC from SFDC using API integration? As MC Connect doesn't support record type objects to synchronize in SFMC. Are there any sample Codes for API or any documentation for this scenario?
1 Answer
The easiest way would be creating a formula field let's 'Sync With MC' and set it as True for only that particular record type data.
Go to Contact Builder > Data Sources > Synchronised > Select the object which you want to synchronise > Add the Boolean field and mark when it equals to True.
In this way the record will synchronise when for the particular record type every 15 mins.
Option 2:
If you still prefer to use an API, then you need to write the logic on Trigger (Insert and Update) to insert/update the record on marketing cloud in real time via REST API.
You would need make an authentication call > get the response token > post call to SFMC to upsert data into data extension.
Below are the reference links:
Oauth2 for SFMC - https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/access-token-s2s.htm
Post call to update data extension - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/insertDataExtensionIDAsync.htm
Let me know if this helps.