Skip to main content
Full Circle Insights

Asynchronous Command Support

You can execute a variety of asynchronous commands by setting fields on objects. This can be done by workflow, manually through the UI, via Apex or via the data loader.

These fields include:

Lead: Admin Execute Command (FCRM__FCR_Superpower_Field_c)
CampaignMember: Admin Execute Command (FCRM__FCR_FCR_Superpower_Field__c)
Contact: Admin Execute Command (FCRM__FCR_Superpower_Field_c)
Person Account: Admin Execute Command (FCRM__FCR_Superpower_Field__pc)

Setting these fields causes the specified command to be scheduled and the field to be immediately cleared. Invalid commands will be ignored. Commands that result in errors will appear in the event log.

Note

that these commands are only executed on a field update. You cannot insert records with these fields already set.

The following commands are currently defined

CreateAssociation

Creates an association (CampaignMember object) between the current lead or contact and specified campaign.Contact, Lead & Person account only.

The command syntax is:

CreateAssociation [respondedstatus] [rpreactivateonly][synctoactivestatus] [treatasrp] [treatasrptr] [trackconversion] [bypassdelegationdelay] campaignid1,campaignid2,campaignid3….

respondedstatus - 'respondedstatus' is the optional status to set into the CampaignMember. If not specified 'Responded' is used. This parameter may be enclosed in quotes if the status includes spaces. 

rpreactivateonly - rpreactivateonly triggers Response Prompt Reactivation’s matching sequence on the CampaignMember’s Lead/Contact. The specified CampaignMember isn’t required to be associated to a response prompt campaign; and if it is, it’s not required to be configured to “Trigger Reactivation”. If the matching sequence fails to selecting a CampaignMember to reactivate or creates a new response, no CampaignMember will be created. The CampaignID is ignored when this command is specified (though a valid campaign ID must be provided as a parameter - it will never be used). Do not use treatasrp or treatasrptr when specifying this option.

synctoactivestatus - If the 'synctoactivestatus' option is specified, the system will treat the response insert as occurring when Active Response Timeframe is configured and applicable. In other words, if the lead or contact has an active status and no active response, the new response will have its status updated based on the lead or contact status and it will become the active response. This will apply on active or passive orgs. The effective timeout value is ten years.

treatasrp - If the 'treatasrp' option is specified the response will be treated as a response prompt campaign (See the description of the TreatNextCampaignAssociationAsResponsePrompts API function). The response will automatically be qualified when this option is chosen.

treatasrptr - treatasrptr is similar to treatasrp in that they both treat the specified CampaignMember as a response prompt campaign. However, treatasrtr triggers Response Prompt Reactivation’s matching sequence on the CampaignMember’s Lead/Contact. The specified CampaignMember isn’t required to be associated to a response prompt campaign; and if it is, it’s not required to be configured to “Trigger Reactivation”. If the matching sequence ends up selecting a CampaignMember to reactivate or creates a new response, the specified CampaignMember won’t be created. Since this option performs the action of treatasrp, there’s no reason to include both treatasrp and treatasrptr in your command script.

trackconversion - If the 'trackconversion' option is specified and the lead is converted between the time the field is set and the association executes, the campaign will be associated to the converted contact. 

bypassdelegationdelay - If the 'bypassdelegationdelay' option is specified then the async request will run on a one minute delay and as the delegated async user that is configured in the application configuration.

campaignid - The campaignid list is a comma separated list of campaign IDs (15 or 18 character) with no spaces in between.

The CreateAssociation command causes a CampaignMember to be created to associate the current lead or contact with the specified campaigns. The associations are created one at a time in the specified order. The associations take place as if performed by a repeat response user. The system and user mode (passive or active) is respected.

SyncSourcesToResponses

Synchronizes fields from either a Contact or Lead record to a CampaignMember record that is related to that Lead or Contact.  The fields that get synchronized are the ones configured to sync in the app.

The command gets entered on the superpower field on the Lead or Contact record.

Command syntax is:

SyncSourcesToResponses campaignMemberId, update/create

update/create is used to determine if a field should get synchronized.  When fields are configured to sync in the app they can be set to sync on update and on create.

campaignMemberId If the CampaignMember specified is not associated to the Lead or Contact that the command was entered on, then the sync will fail.

SyncFromSource

Synchronizes fields from either a Contact or Lead record to a CampaignMember record.  The fields that get synchronized are the ones configured to sync in the app.

The command gets entered on the superpower field on the CampaignMember record.  If the CampaignMember.ContactId field is not populated, then the sync takes place from the associated Lead (CampaignMember.LeadId).  Otherwise it takes place from the associated Contact.`

Command syntax is:

SyncFromSource update/create

update/create is used to determine if a field should get synchronized.  When fields are configured to sync in the app they can be set to sync on update and on create.

AssignLead

Results in a Lead assignment rule getting run.  

The command gets entered on the superpower field on the Lead record.  If an assignment rule ID is included in the command, then that rule will get run.  If not assignment rule ID is included, then the default active rule will get run.

Command syntax is:

AssignLead [assignmentRuleId]

assignmentRuleId  Optional parameter.  If passed, and is a valid ID of an active assignment rule in the org, then the assignment rule will get run.  Note that the record must meet the assignment rule criteria in order for the actual assignment to take place.

  • Was this article helpful?