7.2.18 Configure Custom Probability
As of version 2.119, you can now configure custom probability for your Media Campaigns. Within ADvendio each Media Campaign stage corresponds to a Probability %.
The Media Campaign's probability will be calculated automatically after you have saved the new stage. The default probabilities for the available stages are as follows:
First contact - 5%
Initial Offer (w/o request) - 10%
Stage 20% - 20%
Stage 25% - 25%
Alternative quote - 30%
Stage 40% - 40%
Offer on Request - 50%
Stage 60% - 60%
Showed interest - 70%
Stage 75% - 75%
Positive Feedback (Agency/Advertiser) - 80%
Stage 90% - 90%
Booked - 100%
IO received - 100%
Out of date - 0 %
Offer denied - 0 %
However, you can configure your own custom probability using the Custom Probability field on Media Campaign. This field will be respected by the Probability (%) formula field and can be automatically populated using a workflow rule or custom trigger.
For example, you have two custom stages and probabilities which are not reflected in ADvendio default stages; Initial Offer (w request) - 15% and Binding Confirmation - 95%
Create two new stages in the Stage picklist on your Media Campaign
Navigate to your Setup → Object Manager → Media Campaign → Fields & Relationships
Select Stage
Scroll to Values, press New
Add values for your new stages; Initial Offer (w request),Binding Confirmation
Salesforce is retiring Workflow Rules and Process Builder. Building this automation in a Flow is the recommended and modern approach. Instead of creating multiple workflow rules, we can accomplish the entire process in one record-triggered Flow, which is more efficient and easier to maintain.
We highly recommend to move all your workflows rules to flows
How to create the flows for custom probability stage
Step 1: Create the Record-Triggered Flow
Navigate to Setup > Flows.
Click New Flow.
Select Record-Triggered Flow and click Create.
Configure the Flow Trigger
Object:
Media CampaignTrigger the Flow When:
A record is created or updatedSet Entry Conditions:
Condition Requirements:
All Conditions Are Met (AND)Field:
StageName(This is the API name for the 'Stage' field)Operator:
Is ChangedValue:
$GlobalConstant.True
Optimize the Flow for:
Fast Field Updates
This configuration ensures the flow only runs when the Stage field on a Media Campaign is changed, which is exactly what we need.
Step 2: Add a Decision Element
A Decision element will check the new Stage value and direct the Flow to the correct update action.
On the Flow canvas, click the + icon after the Start element.
Select the Decision element.
Label:
Check Stage ValueAPI Name:
Check_Stage_Value
Configure the Outcomes
We'll create a path for each of our custom stages and a default path for all other stages.
Outcome 1: Initial Offer
Label:
Initial Offer (w request)Outcome API Name:
Initial_Offer_w_requestCondition Requirements to Execute Outcome:
All Conditions Are Met (AND)Resource:
{!$Record.ADvendio__Stage__c}Operator:
EqualsValue:
Initial Offer (w request)(Select the picklist value)
Outcome 2: Binding Confirmation
Click the + to add a new outcome.
Label:
Binding ConfirmationOutcome API Name:
Binding_ConfirmationCondition Requirements to Execute Outcome:
All Conditions Are Met (AND)Resource:
{!$Record.ADvendio__Stage__c}Operator:
EqualsValue:
Binding Confirmation(Select the picklist value)
Default Outcome
The final path is the "Default Outcome." We'll leave this as is. It will act as our "reset" rule.
Step 3: Update the Custom Probability Field
Now, add the actions to update the Custom Probability field for each path.
For the "Initial Offer (w request)" Path:
Click the + icon on the "Initial Offer (w request)" path.
Select Update Triggering Record.
Label:
Set Probability to 15%API Name:
Set_Probability_to_15Set Field Values for the Media Campaign Record:
Field:
Custom_Probability__c(Select your custom probability field)Value:
15
For the "Binding Confirmation" Path:
Click the + icon on the "Binding Confirmation" path.
Select Update Triggering Record.
Label:
Set Probability to 95%API Name:
Set_Probability_to_95Set Field Values for the Media Campaign Record:
Field:
Custom_Probability__cValue:
95
For the "Default Outcome" Path:
Click the + icon on the "Default Outcome" path.
Select Update Triggering Record.
Label:
Reset Custom ProbabilityAPI Name:
Reset_Custom_ProbabilitySet Field Values for the Media Campaign Record:
Field:
Custom_Probability__cValue: null/blank
Step 4: Save and Activate
Your final Flow should look something like above:
Click Save in the top right corner.
Flow Label:
Media Campaign: Update Custom ProbabilityFlow API Name:
Media_Campaign_Update_Custom_ProbabilityClick Save.
Finally, click Activate to turn your new Flow on.
Now, whenever the Stage of a Media Campaign is updated, this single Flow will handle setting the correct custom probability or clearing it out when needed.
Now, whenever your Stage is set to your custom Stages, the Custom probability field will be updated automatically by your flow rules.
And when your stage is set to a stage other than your Custom stages, the other workflow rule will be triggered to set your Custom Probability to zero.
We highly recommend moving your workflow rule to Flows
Create a Workflow Rule for each custom stage of the Media Campaign
Navigate to your Setup → Workflow Actions → Workflow Rules
Press New Rule
Select Object Media Campaign
Name your rule
Enter evaluation criteria as created, and any time it's edited to subsequently meet criteria
Enter Rule Criteria as Run this rule if the criteria are met and where field [Media Campaign: Stage], Operator [equals], Value [one of your new custom stages]
Then add a Workflow Action: field update to update the field Custom Probability field to 15% when your Media Campaign is at the Stage Initial Offer (w request), this will automatically update the probability (%) formula field
Set to Re-evaluate Workflow Rules after Field Change to true
Activate your rule
You can create as many custom workflow rules for as many custom stages/probabilities as you would like. However, you also need to create an additional rule to reset the custom probability field for situations where a custom stage should not be reflected in the probability field.
Create a new workflow rule as set out above
Rule criteria field [Media Campaign: Stage], Operator [not equal to], Value [your custom stages, eg Initial Offer (w request),Binding Confirmation]
Workflow Action: Field Update to update the Custom Probability to field blank(null)
Re-evaluate Workflow Rules after Field Change set to true
Activate your rule