Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The PowerSync connector for Magento and Salesforce platforms enables merchants to synchronize data between both platforms based on a Schedule and in Real-Time.

...

Run the following command in the Magento root using the console

Code Block
bin/magento list

and you should see a new console command

Code Block
...
tnw_salesforce
   tnw_salesforce:cron:run Runs Salesforce synchronization queues.

If you see this command, you should be ready and can proceed.

...

If you don’t know how to configure Magento CRON jobs, see the

For Magento Commerce Cloud, see Magento 2 Commerce Cloud CRON Configuration.

...

Tip

This is the latest version of the PowerSync connector

Code Block
### Process bulk requests from Salesforce
*/5 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run incoming -a >> /var/www/html/var/log/sforce-incoming.cron.log

## temporary data cleanup
* * * * * php -f /var/www/html/bin/magento tnw_salesforce:clean:queue >> /var/www/html/var/log/sforce-clean-queue.cron.log
*/5 * * * * php -f /var/www/html/bin/magento tnw_salesforce:clean_system_logs >> /var/www/html/var/log/sforce-clean_system_logs.cron.log
Note

IMPORTANT: You might need to also register the Magento queue listeners manually.
Follow the manage message queues documentation and add the following listeners to your /app/etc/env.php file.

  • tnwSalesforceSyncRealtimeAmqp

  • tnwSalesforceSyncRealtimeDb

  • tnwSalesforcePrequeueProcessDb

  • tnwSalesforceQueueProcessBackgroundDb

  • tnwSalesforceQueueProcessNormalDb

  • tnwSalesforcePrequeueProcessAmqp

  • tnwSalesforceQueueProcessBackgroundAmqp

  • tnwSalesforceQueueProcessNormalAmqp

  • tnwSalesforceQueueProcessCheckNormalDb

  • tnwSalesforceQueueProcessCheckNormalAmqp

  • tnwSalesforceQueueProcessCheckBackgroundDb

  • tnwSalesforceQueueProcessCheckBackgroundAmqp

  • tnwSalesforceSyncQuoteDb

  • tnwSalesforceSyncQuoteAmqp

  • tnwCountryStateUpdateConsumerDb

  • tnwCountryStateUpdateConsumerAmqp

...

Example (for PowerSync connector version 2.6 or older)

Code Block
### Process bulk requests from Salesforce
*/5 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run incoming -a >> /var/www/html/var/log/sforce-incoming.cron.log

## Send records to Salesforce
*/5 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run background -a -p >> /var/www/html/var/log/sforce-background.cron.log
*/2 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run outgoing -a -p >> /var/www/html/var/log/sforce-outgoing.cron.log

## Check records in Salesforce
*/2 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run background -a -c >> /var/www/html/var/log/sforce-background.cron.log
*/2 * * * * php -f /var/www/html/bin/magento tnw_salesforce:cron:run outgoing -a -c >> /var/www/html/var/log/sforce-outgoing.cron.log

## Prepare records for Salesforce
* * * * * flock -n /var/www/html/var/locks/sforce-prequeue.lock php -f /var/www/html/bin/magento tnw_salesforce:cron:prequeue >> /var/www/html/var/log/sforce-prequeue.cron.log

## temporary data cleanup
* * * * * php -f /var/www/html/bin/magento tnw_salesforce:clean:queue >> /var/www/html/var/log/sforce-clean-queue.cron.log
*/5 * * * * php -f /var/www/html/bin/magento tnw_salesforce:clean_system_logs >> /var/www/html/var/log/sforce-clean_system_logs.cron.log