Connector for Salesforce Marketing usage in Content Delivery
The Connector for Salesforce Marketing uses the Content Deployer Extension to publish HTML fragments and images to Salesforce Marketing Cloud. Content Delivery's open GraphQL interface provides the ability to list and search for Salesforce Marketing Cloud (SFMC) data.
Show personalized content using SFMC lead data
When using the optional Experience Optimization feature, you can define Segments that can be used by the website to show users customized versions of forms based on their interests. The following screen capture illustrates a "Commercial" segment that is linked to a related "Commercial Registration Form":
The details collected when visitors complete the targeted form also get saved into SFMC and used to trigger customer journeys, such as a custom email.
Use Tridion Sites published images in SFMC journeys
If you have published Multimedia Components from Tridion Sites to SFMC, users of SFMC can also have access to Tridion Sites images and use them just like any other SFMC asset. The following screen capture illustrates a Tridion Sites being used in an SFMC email:
GraphQL queries
externalItem- use to get a single SFMC data itemexternalItems- use to search for or list a set of SFMC data items
The following example illustrates using the externalItem request to retrieve Contact details:
{
externalItem(identity: {
namespace: "sfmc"
id: "santa.clause@gmail.com"
type: "Contact"
}) {
... on Contact {
identity {
id
}
journeys {
name
eventDefinitions {
key
name
}
contactData {
name
value
}
}
}
}
}
Refer to the GraphQL reference section for more examples.
GraphQL mutations
The Connector for Salesforce Marketing supports mutations, specifically a mutation to trigger journey: createJourneyEventTrigger
The following example illustrates the mutation:
mutation {
createJourneyEventTrigger(
parentIdentity:
{namespace: "sfmc", id: "root", type: "mp"},
input: {
eventDefinitionKey: "APIEvent-03354c03-3996-a16d-8567-687276c70f67",
contactKey: "santa.clause@gmail.com",
values: [
{name: "email", value: "santa.clause@gmail.com"}
, {name: "visitedCampaignPage", value: "true"}
]}) {
identity {
namespace
id
type
localeId
structureType
}
}
}
Refer to the GraphQL reference section for more examples.