Download the PHP package ycloudyusa/openy_traction_rec without Composer

On this page you can find all versions of the php package ycloudyusa/openy_traction_rec. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openy_traction_rec

YMCA Website Services Traction Rec integration

This module provides YMCA Website Services integration with the Traction Rec CRM.

Installation

Require this module:

Then enable the necessary modules and submodules:

Usage

The main module itself provides only API that helps fetch data from TractionRec. More specific functionality is provided in submodules:

See modules/openy_traction_rec_import/README.md for details on how to import content once configuration is complete.

Configuration

Create a Connected App in Salesforce

  1. Create a new private key and X509 certificate, customizing the subj options in the command to suit your organization. (See the manual for openssl-req to understand the options here.)

    • The email address in the certificate does not need to match the email on the Connected App.
    • The certificate must be renewed yearly (or after the set number of --days). We recommend you set a reminder in order to prevent unwanted failures.
  2. In Salesforce > Setup > App Manager, create a New Connected App.
    • Set a Name and Email.
      • The Contact Email is not used for authentication.
    • Check Enable OAuth Settings
      • Set the callback url as the base URL of your site
      • Check Use digital signatures and upload the X509 certificate (.crt) created above.
      • Ensure the app has the following Selected OAuth Scopes
      • Full access (full)
      • Manage user data via APIs (api)
      • Manage user data via Web browsers (web)
      • Perform requests at any time (refresh_token, offline_access)
      • Check these options:
      • Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows
      • Issue JSON Web Token (JWT)-based access tokens for named users
      • Uncheck all other options in the OAuth section.
    • Save the Connected App
  3. Once the app is saved, you will need to get the Consumer Details:
    • In the "My Connected App" screen that appears once you save (or via Setup > App Manager), click Manage Consumer Details.
    • Save the Consumer Key and Consumer Secret for the next step.
  4. Create a Profile OR Permission Set to assign permissions to your app. We recommend using a Permission Set as those are the option recommended by Salesforce.
    1. Your Traction Rec support team should be able to deploy the Traction Rec Activity Finder Permission Set from their dev1 instance. If this Permission Set is deployed, proceed straight to the User creation step. To create a Permission Set from scratch:
      • Setup > Users > Permission Sets > New
      • Fill in the Label as you wish, and leave License as --None--
      • In the new Permission Set, open Object Settings.
      • In the very long list of Object Settings, do the following for each of the 10 Objects listed below:
      • Find the object and click to open it. In the configuration screen for each Object:
        • Under Object Permissions, mark Read as Enabled.
        • Under Field Permissions, mark Read Access on the header field to provide access to all fields.
      • Save the Object Settings and search for the next one.
      • Finally, review the summary of access permissions and ensure Read access is provided for each of the necessary objects.
    2. Create a Profile:
      • You must do this before creating a user.
      • Setup > Users > Profiles > New
      • When asked what Existing Profile to clone from, select Standard User or Standard Platform User. Be sure to note the User License connected to the target profile.
      • In the very large configuration screen, click Edit, then:
      • Under Connected App Access, add access to the Connected App you created above.
      • Search for and enable the System permissions listed below.
      • Under Custom Object Permissions, add Read access to the Objects listed below.
      • Save those changes.
  5. Create a new User with the new Profile or Permission Set:
    • Setup > Users > New User
    • User License - The option under which you created the Profile in the previous step, or Salesforce.
    • Email - A working email that you will use to receive login verifications.
    • Username - This is not your email and must be unique across all Salesforce Organizations. This is the name that will be used in the Drupal connection below. If you enter a preexisting username, you will receive this error:

      Error: Duplicate Username. The username already exists in this or another Salesforce organization. Usernames must be unique across all Salesforce organizations. To resolve, use a different username (it doesn't need to match the user's email address).

    • Assign the User to the Profile you created above, or a Permission Set that has the necessary permissions.
      • Under Permission Set Assignments, click Edit Assignments
      • Find the Permission Set you created in the prior step, select it, click Add, then Save.
  6. Confirm your Connected App, Profile, and User are connected:
    • Go to Setup > Apps > Connected Apps > Manage Connected Apps and choose your new app. Assign the Profile or Permission Set that contains your new user if it does not already show under the relevant section.
      • Click Manage Profiles or Manage Permission Sets
      • Search for your Profile or Permission Set and Save.
    • In the Connect App Detail, click Edit Policies:
      • Under OAuth Policies > Permitted Users choose Admin approved users are pre-authorized.
      • Check Issue JSON Web Token (JWT)-based access tokens.
      • Save the Connected App details.

When the process is complete, you should have the following relationships between the User, Permission Set OR Profile, and Connected App:

  • the API User should be assigned the Permission Set OR Profile.
  • the Connected App should be assigned the same Permission Set OR Profile.

Review all of these steps carefully. Missing any of them can result in an inability to query the API.

Salesforce permissions

The Salesforce integration Permission Set OR Profile should have read access to all fields in the following objects:

If using a Profile, it should also have the following Systems Permissions:

Configure the connection in Drupal

  1. Go to Admin > Configuration > System > Keys (/admin/config/system/keys) and create a new key to store the private key created above.
    • Add key
    • Add a Key name and Description
    • Choose Key Type: "TractionRec JWT Private Key"
    • Choose the Key provider depending on your configuration. See Managing Keys for details.
    • Configure the chosen provider then Save the key.
  2. Go to Admin > YMCA Website Services > Integrations > Traction Rec > Traction Rec auth settings (/admin/openy/integrations/traction-rec/auth) to configure the keys & secrets provided by Traction Rec.
    • Add the Consumer key and Consumer Secret from Manage Consumer Details in Salesforce.
    • Add the User connected to the Connected App.
      • This is the Username of the User, not the Contact email.
    • Enter a Login URL.
      • This will most likely be https://login.salesforce.com
    • Set the Services base URL and REST API Base URL as per their descriptions.
      • Ensure the REST API Base URL responds to curl -I with a 200 response. Replace URLs like *.lightning.force.com with *.my.salesforce.com because the lightning url may result in a redirect, which will cause an authentication error, like ([@"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"]).
    • Set the Community URL based on the publicly accessible registration links.
      • This may be something like https://my-ymca.my.site.com
      • The URL can be found in Salesforce under Setup > Digital Experiences > All Sites.
    • Choose the key as configured above.

Mapping

The TractionRec importer pulls data from TractionRec.php for the full queries):

Object Mapping

The fetcher outputs these files:

Note: Traction Rec's labels for "Programs" and their child groupings are different:

Mapping to Drupal fields

Those files are then imported into Drupal content via importers (in config items that start with migrate_plus.). The import goes as follows:

  • Drupal Content Type (bundle)
    • Salesforce/TractionRec source fieldDrupal destination field

Data Model

This module assumes a Traction Rec "standard" data model in its queries. Any deviations from this model will require overriding the queries in src/TractionRec.php.

This model contains a subset of the fields in Traction Rec that are relevant to our usage. All entities have more fields than listed.

Field types are taken from Salesforce's Setup > Object Manager > {Entity} > Fields & Relationships.


All versions of openy_traction_rec with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8
ycloudyusa/yusaopeny Version 9.* || dev-9.x-2.x || dev-main || *
ycloudyusa/yusaopeny_activity_finder Version ^4.0 || *
open-y-subprojects/openy_features Version ^1.5 || *
drush/drush Version ^12 || ^11 || ^10
drupal/migrate_plus Version ^5.2 || ^6
drupal/migrate_tools Version ^5.1 || ^6
drupal/key Version ^1.15
firebase/php-jwt Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ycloudyusa/openy_traction_rec contains the following files

Loading the files please wait ....