TransWikia.com

Making a callout To Marketing cloud from Service Cloud External Services

Salesforce Asked on December 7, 2021

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??

One Answer

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.

Answered by Brad Sapkota on December 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP