$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SalesforceintermediateNew

Salesforce Marketing Cloud

Share

Build journeys, email templates, and AMPscript automations

Works with OpenClaude

You 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

  1. Create a data extension in Marketing Cloud with subscriber fields (Email, FirstName, LastName, CustomerID) — this is your source audience for journeys
  2. Build a journey in Journey Builder by navigating to Interactions > Journey Builder > Create and selecting an audience data extension as your entry source
  3. Add an email activity to your journey and select or create a new email in Email Studio with a template
  4. Write AMPscript in the email template body using the %%=ContentBlockByKey("blockName")=%% syntax to insert dynamic content blocks
  5. Use AMPscript variables to personalize content: %%[ set @firstName = [FirstName] ]%% then reference with Hello %%=@firstName=%%
  6. Configure decision splits in your journey using subscriber attribute conditions — e.g., "If Industry equals Technology, send Tech Email; else send General Email"
  7. Set up an automation in Automation Studio using a Scheduled Automation triggered by a data extension update or time-based schedule
  8. 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

Quick Info

CategorySalesforce
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
salesforcemarketing-cloudampscript

Install command:

curl -o ~/.claude/skills/sf-marketing-cloud.md https://clskills.in/skills/salesforce/sf-marketing-cloud.md

Related Salesforce Skills

Other Claude Code skills in the same category — free to download.

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.