0

I have been trying to invoke Marketing Cloud Transactional API from Salesforce Service cloud. I saw there is a Marketing Cloud Open API Spec for Transactional Messaging: https://sforce.co/2GuuYMn and I decided to make a connection through flows and External Services.I was able to create External services through it but I am not sure how to make a authentication call to SFMC first from Lightning Flows so that I get a token and then invoke the endpoints from transactional API.Is it possible to achieve it or am i asking for too much from Flows??

1
0

Regarding how to authenticate with SFMC, here is what you need:

  • Within SFMC: Go into Administration > Installed Packages and find/create the installed package (server-to-server type) you are using to authenticate and make REST calls. More info here.
  • Next step is to define/check the API Integration Permission Scopes for your installed package. More info here.

To use the transactional API you will need below scopes defined:

-- Email - Read, Write, Send

-- Lists and Subscribers - Read, Write

-- Data Extensions - Read, Write

-- Interactions - Read, Write, Execute

  • Once you've setup the package you'll be able to retrieve ClientId, ClientSecret and Authentication URI. More info here.

  • Below is a sample payload from the official SF documentation:

Host: https://YOUR_SUBDOMAIN.auth.marketingcloudapis.com
POST /v2/token
Content-Type: application/json

{
"grant_type": "client_credentials",
"client_id": "7a9j47upktedde30uedl822p",
"client_secret": "1955278925675241571",
"scope": "email_read email_write email_send",
"account_id": "12345"
}
  • With regards to flow setup I am not sure what is involved but if you could manage to setup transactional API requests then this one shouldn't be vastly different.
2
  • Sapoka,The problem is not setting it up in Marketing Cloud and installed packages and configurations.I am trying to connect to Marketing cloud from Service cloud through Flows/External Services. – Chetan Jul 24 '20 at 6:31
  • @Chetan your post says "but I am not sure how to make a authentication call to SFMC first so that I get a token and then invoke the endpoints from transactional API." So I have provided on steps to authenticate with SFMC. Now if your question was regarding on how to setup in FLOW, you should post this question in SFDC for better success. Hope this helps – Brad Sapkota Jul 24 '20 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.