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.
REQUIREMENTS
============
* [Swaggest PHP Json Schema](https://github.com/swaggest/php-json-schema)
CORE
----
* [Drupal Core >= 8.5](https://www.drupal.org/project/drupal)
3rd Party
---------
These should be automatically installed by composer when you install this module.
* [Swaggest PHP Json Schema](https://github.com/swaggest/php-json-schema)
OBJECTIVES
==========
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.
REQUIREMENTS
============
* [Swaggest PHP Json Schema](https://github.com/swaggest/php-json-schema)
CONFIGURATION
=============
* Configure user permissions in Administration > People > Permissions:
ADMINISTER MARKETING CLOUD
--------------------------
Users in roles with the "Administer Marketing Cloud" permission will see
the Marketing Cloud configure link in the admin > configure page.
SIMILAR PROJECTS
================
CONFIGURE MARKETING CLOUD
-------------------------
SALESFORCE
----------
* 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
token.
* 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).
USAGES
======
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
https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/routes.htm
EXACT TARGET API
----------------
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.
TROUBLESHOOTING
===============
* 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
https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/routes.html
* 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
https://www.drupal.org/project/issues/marketing_cloud
SUPPORT
=======
Updates to the Json Schema are welcome.
FAQ
===
A community documentation page is available on
[Drupal.org](https://www.drupal.org/docs/8/modules/marketing-cloud). 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:
```php
$response = \Drupal::service('marketing_cloud.<service_name>')
-><message_function>($data);
```
* 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
issues.
MAINTAINERS
===========
* John Avery (john_a) - https://drupal.org/user/2573976
* [john_a](https://drupal.org/user/2573976)
Markdown is supported
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