Commit 625c6347 authored by john_a's avatar john_a Committed by John Avery
Browse files

Issue #3003147 by mattshoaf, john_a: Similar project

parent 7a8d7a32
......@@ -31,6 +31,30 @@ following API resources are available in sub-modules:
This module is intended for module developers.
* [Swaggest PHP Json Schema](
* [Drupal Core >= 8.5](
3rd Party
These should be automatically installed by composer when you install this module.
* [Swaggest PHP Json Schema](
There are a lot of API calls available in the Salesforce Marketing Cloud API.
This module aims to provide all of them as a service in one place.
......@@ -45,94 +69,50 @@ render the JSON from that. Instead, it is up to the developer to produce the
JSON object, and the service will then validate the JSON object against the
schema to make sure that it meets minimum requirements.
The schema can be edited and Json validation can we switched
The schema can be edited and validated, and Json validation can we switched
on/off in the settings.
* [Swaggest PHP Json Schema](
* Configure user permissions in Administration > People > Permissions:
Users in roles with the "Administer Marketing Cloud" permission will see
the Marketing Cloud configure link in the admin > configure page.
* admin > config > marketing cloud
* Client ID: The client ID from Salesforce for your app.
* Client Secret: The client secret from Salesforce for your app.
* Validate JSON: Uncheck this to prevent the module from validating any
JSON body payloads.
* Do not send API request: This is only used for automated testing.
* Salesforce API URL base: The Salesforce exact target API URL.
* Salesforce auth token request URL: The URL defined by SalesForce to fetch
a valid auth token.
* Max login attempts: The URL defined by SalesForce to fetch a valid auth
* Seconds to wait before token re-request: used to prevent concurrent fresh
token requests causing a stampede.
This suite integrates with Salesforce by asynchronously synchronizing Drupal
entities (E.g., users, nodes, files) with Salesforce objects (E.g., contacts,
organizations, opportunities).
However it uses Salesforce OAuth, which is an entirely different endpoint to
Marketing Cloud, and requires different credentials.
See the Marketing Cloud Example module for an example of creating a webform
plugin, to trigger an SMS on form submission.
For details on the Marketing Cloud API, please visit
Provides abstraction of the ExactTarget XML API for use by other modules. By
itself, this module provides no functionality and should only be installed if
another module requires it as a dependency.
* If messages are not sent:
* Check that your Client ID/Secret are correct.
* Check in Watchdog and SalesForce log for any error messages.
* SalesForce complains that there are missing fields or an invalid message.
or missing fields.
* There may have been an API change at the SalesForce end. Check the docs at
* If you are able to, you can edit the JSON Schema at Configuration >
Web Services > Marketing Cloud > Marketing Cloud <SMS, Contacts, etc>
* Raise a support ticket at
Updates to the Json Schema are welcome.
A community documentation page is available on
[]( Please
add your notes on solving issues and configuring the module there.
* Why are messages are not sent immediately?
* Salesforce works on batch messaging, and has a high volume of message
requests, so is unable to send immediately.
* To use the marketing cloud services (see marketing_cloud_example to see a
working example):
* Enable marketing_cloud, and any of the API services that you want to use,
such as marketing_cloud_push or marketing_cloud_messaging
* Create an array for the JSON data in the call.
* Call the service:
$response = \Drupal::service('marketing_cloud.<service_name>')
* The session login and token will all be taken care of by marketing_cloud
and its configuration.
Please search the issue queue before filing an issue, and update to latest
development release to make sure your problem has not already been fixed.
Issues filed using the issue summary template will receive priority over other
* John Avery (john_a) -
* [john_a](
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment