Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 31 Current »

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

Prerequisites

Run the following command in the Magento root using the console

bin/magento list

and you should see a new console command

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

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

Server Configuration

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

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

Examples below assume your Magento root folder is var/www/html.

Example (for PowerSync connector version 2.7 and above)

This is the latest version of the PowerSync connector

### 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

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

  • the “Ampq” suffix added to the consumers for the RabbitMQ Message Queue

  • the “Db“ suffix has consumers for the Standard(MysqlMQ) Message Queue

Configuring the Magento 2 extension

Example (for PowerSync connector version 2.6 or older)

### 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

  • No labels