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??
Regarding how to authenticate with SFMC, here is what you need:
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" }
Answered by Brad Sapkota on December 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP