Automation - Update Sales/Service Cloud from Marketing Cloud with AMPscript and the Automation Studio
git clone https://github.com/MarketingThibs/update-sf-w-ampscript.gitAutomation - Update Sales/Service Cloud from Marketing Cloud with AMPscript and the Automation Studio
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/MarketingThibs/update-sf-w-ampscriptCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Update Sales/Service Cloud records from Marketing Cloud using AMPscript. [COMPANY] is [INDUSTRY]. Here is the [DATA] to update: [DATA]. Use Automation Studio to ensure the updates are processed efficiently. Provide the AMPscript code to accomplish this task.
```ampscript
%%[
VAR @rows, @row, @rowCount, @email, @firstName, @lastName, @company, @industry
SET @rows = RetrieveSalesforceObjects('Contact', 'Id, Email, FirstName, LastName, Company__c, Industry__c', 'Email', '=', '=')
SET @rowCount = rowcount(@rows)
FOR @row = 1 TO @rowCount DO
SET @email = field(@rows, 'Email', @row)
SET @firstName = field(@rows, 'FirstName', @row)
SET @lastName = field(@rows, 'LastName', @row)
SET @company = field(@rows, 'Company__c', @row)
SET @industry = field(@rows, 'Industry__c', @row)
UPSERTDATA('Contact', 1, 'Email', @email, 'FirstName', @firstName, 'LastName', @lastName, 'Company__c', @company, 'Industry__c', @industry)
NEXT @row
]%%
```Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan