User Tools

Site Tools


salesforce_jobs

Perspectium Replicator transfers data between Salesforce and the Perspectium Message Broker Service (MBS) via queues. Dynamic and Bulk Share data in Salesforce are written to the Outbound Message queue in Salesforce. A MultiOutput Processing Job sends messages from the Outbound queue to a queue in the Perspectium MBS.

Please ensure you have the proper credentials to create the message queue or the queue has been created by the Perspectium team support@perspectium.com on the Perspectium MBS before creating it inside Salesforce.

Scheduling Jobs

Perspectium Replicator uses Scheduled Jobs to process inbound and outbound replication data.

MultiOutput Processing Job

The MultiOutput Processing Scheduled Job is used to send outbound replication data from Salesforce to the Perspectium Message Broker Service. Once scheduled, the job will run once every minute. To begin replicating shared data you must configure and activate an instance of the MultiOutput Processing job by doing the following:

  1. Click on the Perspectium Jobs tab
  2. Click New
  3. Select MultiOutput Processing from the Job Type list
  4. Check the Active checkbox
  5. Save

Replicator Subscriber Job

The Replicator Subscriber Scheduled Job is used to process inbound replication data from the Perspectium Message Broker Service to Salesforce. Once scheduled, the job will run once every minute. To being subscribing to shared data you must configure and activate an instance of the Replicator Subscriber Job by doing the following:

  1. Click on the Perspectium Jobs tab
  2. Click New
  3. Select Replicator Subscriber from the Job Type list
  4. Check the Active checkbox
  5. Save

Queue Configuration

Shared Queues

Shared Queue configurations are used to transfer data out of Salesforce to a named queue in Perspectium MBS. If a Shared Queue configuration is not specified for a Dynamic or Bulk Share, the messages are sent to the default psp.in.salesforce queue in Perspectium MBS where routing rules are applied. To create a new Shared Queue configuration:

  1. Click on the Queues tab
  2. Click the New button
  3. Fill in the Queue Name (ex: psp.out.salesforce.test)
  4. Enter the Endpoint URL to the Perspectium MBS (ex:https://yourcompany.perspectium.net)
  5. Enter the Username for your Perspectium MBS account
  6. Enter the Password for your Perspectium MBS account
  7. Select the Direction of Share
  8. Save

Subscribed Queues

Subscribe Queues configurations are used to transfer data from a named queue in Perspectium MBS into Salesforce. To create a new Subscribe Queue configuration:

  1. Click on the Queues tab
  2. Click the New button
  3. Fill in the Queue Name (ex: psp.out.salesforce.test)
  4. Enter the Endpoint URL to the Perspectium MBS (ex:https://yourcompany.perspectium.net)
  5. Enter the Username for your Perspectium MBS account
  6. Enter the Password for your Perspectium MBS account
  7. Select the Direction of Subscribe
  8. Save

Note: When sharing from ServiceNow to Saleforce, please use AES128 encryption since Salesforce currently does not support TripleDES encryption.

Share Configuration

Bulk Share

Setting up bulk share allows a Salesforce instance/organization to share a pre-filtered range of data in a table data at once. The consumer or subscriber of this data can be another instance/organization in Salesforce or a Perspectium Agent. You will need to create a bulk share configuration for each table you want to share.

Bulk shares always result in an attempt to update the record before inserting it at the consumer. The update uses the Id field value when available. You can override this behavior by selecting the “Insert only” option as defined below. Selecting the “Insert only” assumes that no records currently exist in the destination table.

Creating a Bulk Share

To create a Bulk Share click on the Bulk Shares tab. Next click New and enter the following:

  1. Bulk Share Name (ex: All Accounts)
  2. Choose the Table you wish to share from (ex: Accounts)
  3. If using a named queue, choose the Shared Queue
  4. If you want to send a subset of the total table rows, enter the Where condition. Filter Fields can assist building the where clause.
  5. Save
  6. (Optional) Click the Count button to preview the number of records that will be shared.
  7. Click Execute Now to begin Bulk Sharing data

Note: There is a known issue where the Submit for Approval button appears on Dynamic Share and Bulk Share forms. If you see this button, click the Edit Page Layout link in the top-right corner and remove the button from the layout.

Cancelling a running Bulk Share

To cancel a running Bulk Share perform the following steps:

  1. Click the edit button for the Bulk Share you wish to cancel.
  2. Select Cancel from the Status dropdown.
  3. Click Save.

Dynamic Shares

Setting up a Dynamic Share configuration allows a Salesforce instance/organization to share table data in real time. The consumer or subscriber of this data can be another instance/organization of Salesforce or a Perspectium Agent. You will need to create a share configuration for each table you want to share.

Creating a Dynamic Share

To create a Dynamic Share configuration to begin near real-time replication of table data click on the Dynamic Shares tab. Click New and enter the following:

  1. Dynamic Share Name
  2. Select a Table to replicate data from (ex: Account)
  3. Check the Create checkbox if you want to replicate inserts
  4. Check the Update checkbox if you want to replicate updates
  5. Check the Delete checkbox if you want to replicate deletes
  6. If using a named queue, choose the Shared Queue
  7. If you wish to send a subset of the table fields, use the Fields to Share shuttle box.
  8. If you want to send a subset of the total table rows, enter the Where condition. Filter Fields can assist building the where clause.
  9. Click Save
  10. Click Create Trigger

The Apex Trigger Details section contains a read-only version of the Apex Trigger code generated when the Dynamic Share configuration is saved. This can be used to manually create the Apex Trigger if the Tooling API is not available for dynamic Apex Trigger creation. Salesforce does not allow dynamic creation of Apex Triggers in production orgs. Dynamic Share triggers should normally be migrated from sub-production orgs using change control process. To perform this task manually, click the Go to Trigger List link and create or update the trigger using the content in the Apex Trigger Details section.

salesforce_jobs.txt · Last modified: 2017/03/02 15:46 by willm