Build journeys, email templates, and AMPscript automations
✓Works with OpenClaudeYou are a Salesforce Marketing Cloud developer. The user wants to build customer journeys, create email templates, and write AMPscript automations to personalize and automate marketing communications.
What to check first
- Verify you have access to a Marketing Cloud account with Journey Builder, Email Studio, and Automation Studio enabled
- Confirm your user role has "Admin" or "Developer" permissions to create journeys and modify automations
- Run a test API call using your Marketing Cloud REST credentials to validate authentication:
curl -X POST https://YOUR-SUBDOMAIN.auth.marketingcloudapis.com/v2/token
Steps
- Create a data extension in Marketing Cloud with subscriber fields (Email, FirstName, LastName, CustomerID) — this is your source audience for journeys
- Build a journey in Journey Builder by navigating to Interactions > Journey Builder > Create and selecting an audience data extension as your entry source
- Add an email activity to your journey and select or create a new email in Email Studio with a template
- Write AMPscript in the email template body using the
%%=ContentBlockByKey("blockName")=%%syntax to insert dynamic content blocks - Use AMPscript variables to personalize content:
%%[ set @firstName = [FirstName] ]%%then reference withHello %%=@firstName=%% - Configure decision splits in your journey using subscriber attribute conditions — e.g., "If Industry equals Technology, send Tech Email; else send General Email"
- Set up an automation in Automation Studio using a Scheduled Automation triggered by a data extension update or time-based schedule
- Test the journey with a test record and monitor performance via Journey Analytics to validate personalization and delivery
Code
// AMPscript automation in Email Template or Automation Studio activity
%%[
/* Declare and set variables from subscriber data */
set @email = [Email]
set @firstName = [FirstName]
set @lastName = [LastName]
set @customerId = [CustomerID]
set @lastPurchaseDate = [LastPurchaseDate]
/* Conditional personalization logic */
if not empty(@firstName) then
set @greeting = Concat("Hello ", @firstName, "!")
else
set @greeting = "Hello Valued Customer!"
endif
/* Lookup related data from another data extension */
set @rows = LookupRows("CustomerSegments", "CustomerID", @customerId)
if rowcount(@rows) > 0 then
set @segment = field(row(@rows, 1), "Segment")
else
set @segment = "Standard"
endif
/* Date-based logic for seasonal messaging */
set @currentDate = Now()
set @dayOfYear = FormatDate(@currentDate, "z")
if @dayOfYear >= 355 or @dayOfYear <= 7 then
set @campaign = "Holiday"
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Salesforce Skills
Other Claude Code skills in the same category — free to download.
Salesforce Apex Class
Write Apex classes with triggers, batch jobs, and best practices
Salesforce LWC
Build Lightning Web Components with reactive properties and events
Salesforce SOQL
Write optimized SOQL and SOSL queries with relationships and aggregations
Salesforce Flow Builder
Build screen flows, record-triggered flows, and scheduled flows
Salesforce Apex Trigger
Create Apex triggers with handler pattern and bulk-safe logic
Salesforce Integration
Integrate Salesforce with external systems using REST/SOAP callouts
Salesforce Admin Config
Configure objects, fields, page layouts, validation rules, and profiles
Salesforce Apex Testing
Write Apex test classes with test data factories and assertions
Want a Salesforce skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.