Skip to main content
SalesWings for Salesforce - The Workflow Steps

Overview of the synchronization workflow between Salesforce Sales Cloud and SalesWings.

Pauline from SalesWings avatar
Written by Pauline from SalesWings
Updated over 3 months ago

This document describes the workflow steps responsible for keeping data consistent between Salesforce and SalesWings. Follows a description of the duties performed by each step.

Table of content:

Active Steps

Name

Scope

Since

GetTags

  • it aligns as saleswings__SW_Tag__c all tags from SalesWings

2.62

GetScores

  • it aligns as saleswings__Score__c all scores from SalesWings

2.62

GetProspects

  • it upserts as saleswings__Prospect__c all prospects marked as changed by SalesWings since the last synchronization. Each prospect record with life cycle set to Active will have their sync status set to Not Processed - otherwise Processed - and the Contact Sync Attempts and Lead Sync Attempts field value set to 0.

  • it aligns (creates new, updates existing, deletes orphans) all the tags associated with the prospect being synced to the respective saleswings__SW_Prospect_Tag__c records

  • it aligns (creates new, updates existing, deletes orphans) all the scores associated with the prospect being synced to the respective saleswings__Prospect_Score__c records

2.62

GetProspectPages

  • it aligns (creates new, updates existing, deletes orphans) all the pages associated with the prospect being synced in the previous step with the respective saleswings__Page_Prospect__c records

Note: Since the data volume for pages is significantly higher a dedicated step in the sync is required.

Note: This step is optional and included in the synchronization only if explicitly enabled (see Disable Page Visit Sync in the Custom Settings [SW Studio]).

2.119

MatchProspectsToLeads

  • it processes all the prospects set to Not Processed in the GetProspects step. The matching is based on the email address. If there are any leads whose email address corresponds to the prospect’s, the lead gets selected for matching.

  • For each matching lead, the step proceeds to create/align/delete a copy of each prospect’s score, tag, and page (if Disable Page Visit Sync is disabled).

  • If Match Leads via Platform Events is disabled the matching lead gets immediately updated with the information coming from the prospect and its scores, according to the SW Studio Field Mapping records configured. If Match Leads via Platform Events is enabled the update is deferred and performed through the publishing and catching of a platform event (this system provides compatibility for org-code cannot run in a Batchable context).

1 If the lead gets successfully updated the prospect sync status gets set to Processed and will reset the Lead Sync Attempts field value to 0. If the update fails, due to validation rules or other errors, the prospect remains in status of Not Processed. For every failed attempt to update the record, the Lead Sync Attempts field value will be incremented by 1. The step will continue to try to match the prospect and the lead in any subsequent synchronization till the Lead Sync Attempts field reaches the value of 30, after which the matching for the given prospect will be ignored. The count will be reset to 0 if the SalesWings prospect registers a new activity update, which will reactivate it for another synchronization attempt (till successful or 30 is reached again).

2.103

MatchProspectsToContacts

See MatchProspectsToLeads. Instead of leads the step works on contacts.

2.103

CleanLeads

  • it disconnects - by removing any prospect data - the lead1 from any prospect that was marked as Merged or Deleted, or any prospect record that was physically deleted.

1 Only unconverted leads are considered by the process.

2.90

CleanContacts

See CleanLeads. Instead of leads the step works on contacts.

2.90

CleanOtherRecords

  • it deletes orphaned scores, tags and pages for contacts/leads that have been deleted

  • it clears SalesWing data from accounts that had contacts matched by SalesWings prospect but not anymore

  • it deletes orphaned account scores and tags

3.0

AggregateTags

if Account Aggregation is enabled:

  • it aggregates all contact tags at their respective Account level via the saleswings__SW_Account_Tag_Segment_Trigger__c object.

2.62

AggregateScores

if Account Aggregation is enabled:

  • it aggregates all contact scores at their respective Account level via the saleswings__Account_Score__c object.

  • it calculates the SW Account Total Point Score value at the Account level based on its underlying contacts.

  • it applies any other score mapping field, if present

2.62

AggregateTemperature

  • it calculates the median SW Predictive Account Score value at the Account level based on its underlying contacts.

  • it sets the SW Account Last Activity value at the Account level based on its underlying contacts.

2.80

CreateOpportunityTags

if Account Aggregation and Opportunity Tags are enabled:

  • it copies aggregated account tags to any existing account opportunity (saleswings__Opportunity_Tag__c).

2.71

CreateOpportunityScores

if Account Aggregation and Opportunity Scores are enabled:

  • it copies aggregated account scores to any existing account opportunity (saleswings__Opportunity_Score__c).

  • it applies any other score mapping field, if present

2.71

CleanProspects

  • it deletes any orphaned prospect scores1 (saleswings__Prospect_Score__c, this might be necessary in case a prospect is physically deleted, as the relationship between prospect and scores is of Lookup type).

  • it deletes any orphaned prospect pages (saleswings__Page_Prospect__c, this might be necessary in case a prospect is physically deleted, as the relationship between prospect and pages is of Lookup type).

1 Any contact/lead score is also automatically deleted (Master-Detail cascading effect).

3.0

Deprecated Steps

Name

Scope

Since

CountRecords

  • it counts he number of records in each of the SalesWings custom-objects and send the total back to SalesWings for monitoring.

2.118

MatchProspects

  • it matches by email address either contact or lead with the respective prospect.

2.103

DeleteProspects

  • it removes from the contact or the lead any prospect information if the prospect was marked as Merged or Deleted. This will be skipped if the setting Match Leads via Events or Match Contacts via Events.

2.119

DeleteContactPages

  • it deletes orphaned contact/lead pages

2.119

DeletePages

  • it deletes orphaned saleswings__Page__c records (which connect prospect pages to contact/lead pages).

2.119

DeleteProspectScores

  • it deletes any orphaned prospect scores1 (saleswings__Prospect_Score__c, this might be necessary in case a prospect is physically deleted, as the relationship between prospect and scores is of Lookup type).

1 Any contact/lead score is also automatically deleted (Master-Detail cascading effect).

3.0

DeleteProspectPages

  • it deletes any orphaned prospect pages (saleswings__Page_Prospect__c, this might be necessary in case a prospect is physically deleted, as the relationship between prospect and pages is of Lookup type).

1 Any contact/lead score is also automatically deleted (Master-Detail cascading effect).

3.0

DeleteRecordPages

  • it deletes any orphaned contact/lead pages1 (saleswings__Website_Visit__c).

1 Any contact/lead score is also automatically deleted (Master-Detail cascading effect).

3.0

Did this answer your question?