Latest Versions (Adobe Commerce 2.4.3 or under)

ModuleVersion

tnw/salesforce

Latest Versions (Adobe Commerce 2.4.4 and Newer)

ModuleVersion

tnw/salesforce

Installation/Upgrade Instructions.



STEP 1 - Install Magento extension

1.1. Install by the composer manager:

After you get the free version from the Magento Marketplace, use the following command to install the extension:


Adobe Commerce 2.4.3 or under

composer require tnw/salesforce=

Adobe Commerce 2.4.4 and Newer

composer require tnw/salesforce=

1.2. Alternative installation:

Use this path ONLY if you cannot use the composer in your environment. We advise against this path, use it at your own risk!


1.2.1: Upload modules to your server

git clone git@github.com:PowerSync/TNW_Salesforce.git app/code/TNW/Salesforce

git clone git@github.com:PowerSync/TNW_Marketing.git app/code/TNW/Marketing

git clone git@github.com:PowerSync/tnw-soap-client.git vendor/tnw/soap-client

You can also create the following folders manually app/code/TNW/Salesforceapp/code/TNW/Marketing and vendor/tnw/soap-client and clone GIT repos to each respectively:

1.2.2: Modify autoloading files:

  • Open the composer.json file in your Magento folder, find the "psr-0"  section and add the following line:

    "Tnw\\SoapClient\\": ["vendor/tnw/soap-client/src"]
    

    Example:
     

  • Open the vendor/composer/autoload_namespaces.php file, add our soap library to the returned array:

    'Tnw\\SoapClient\\' => array($vendorDir . '/tnw/soap-client/src'),
    

    Example:


  • Open the vendor/composer/autoload_static.php file, add our soap library to the $prefixesPsr0 property array:

            'T' =>
            array (
                'Tnw\\SoapClient\\' =>
                array (
                    0 => __DIR__ . '/..' . '/tnw/soap-client/src',
                ),
            ),

    Example:


The final DIFF is below for your reference:

diff --git a/composer.json b/composer.json
index 02f4db050..679df170d 100644
--- a/composer.json
+++ b/composer.json
@@ -42,7 +42,8 @@
             "": [
                 "app/code/",
                 "generated/code/"
-            ]
+            ],
+                       "Tnw\\SoapClient\\": ["vendor/tnw/soap-client/src"]
         },
         "files": [
             "app/etc/NonComposerComponentRegistration.php"
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index 615206498..c8d043ae5 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -9,6 +9,7 @@ return array(
     'org\\bovigo\\vfs\\' => array($vendorDir . '/mikey179/vfsstream/src/main/php'),
     'Zend_' => array($vendorDir . '/magento/zendframework1/library'),
     'Yandex' => array($vendorDir . '/allure-framework/allure-codeception/src', $vendorDir . '/allure-framework/allure-php-api/src', $vendorDir . '/allure-framework/allure-php-api/test', $vendorDir . '/allure-framework/allure-phpunit/src'),
+    'Tnw\\SoapClient\\' => array($vendorDir . '/tnw/soap-client/src'),
     'PhpCollection' => array($vendorDir . '/phpcollection/phpcollection/src'),
     'PHPMD\\' => array($vendorDir . '/phpmd/phpmd/src/main/php'),
     'OAuth\\Unit' => array($vendorDir . '/lusitanian/oauth/tests'),
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 8b0193df4..7fcae7317 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -2391,6 +2391,13 @@ class ComposerStaticInitda276fee84442e1e42cff33a09c39d5e
                 3 => __DIR__ . '/..' . '/allure-framework/allure-phpunit/src',
             ),
         ),
+        'T' =>
+        array (
+            'Tnw\\SoapClient\\' =>
+            array (
+                0 => __DIR__ . '/..' . '/tnw/soap-client/src',
+            ),
+        ),
         'P' =>
         array (
             'PhpCollection' =>



STEP 2 - Compile & clear cache


STEP 3 - Install Salesforce Managed package

Install PowerSync Core managed package next.

IMPORTANT: You only need PowerSync Core managed package for this version and other managed packages will not give you anything extra w/o additional Magento code and they will also expire if you don't purchase them.

Also, see Salesforce fields access level setup to make confirm your field permission settings in Salesforce.


STEP 4 - Generating Enterprise WSDL File