How to Auto-create Referrals from an Opportunity

Follow

Table of Contents

- Create Outgoing Referrals Automatically
- User Personas/Permission Sets
- Flow Template to Auto-create Referral from Opportunity
- Managing Opportunities to Auto-create Referrals
- Configure Default Values for New Referrals
- Default Ready for Submit Field Value


1. Create Outgoing Referrals Automatically

This functionality is available if your admin has configured and activated the Flow to auto-create Referrals and if the user is assigned either WorkSpan Account Executive or WorkSpan Sales Ops Manager permission set. Auto-creation works on the principle of no user input, it is triggered as soon as you try to save the Opportunity that now meets the Flow entry criteria. At that moment, the Flow tries to create a Referral, populating all the fields according to default field mappings. If your admin has left the default Ready For Submit value as “No,” then most field validations are skipped during bulk creation. Otherwise, if the default mapped value does not meet the validation criteria (or if the user doesn’t have a proper permission set), then not only will a Referral not be created, but the Opportunity won’t be saved as well.

Note: Just because a Referral was successfully created using auto-create—doesn’t mean it is a ‘finished’ Referral. If your admin has left the default Ready For Submit value as “No,” then most field validations are skipped during auto-creation. It is very similar to draft Referrals created in WorkSpan (see 2.17.2.1): they exist in the system, but you might not be able to edit (see 3.1.5) or submit (see 3.1.4) them without populating some fields first.

For detailed information, watch this video. 

2. User Personas/Permission Sets

This is a required step for a new installation. Assign appropriate permission sets to your Salesforce users. 

  1. WorkSpan Account Executive (AE)—The primary App user. This persona is responsible for running direct-sell motions leveraging Salesforce and also running co-sell motions to win deals through collaboration with partners.
  2. WorkSpan Sales Ops Manager (SOM)—This persona is in charge of operational excellence. It manages Partner and Microsoft Solution records in Salesforce and distributes Incoming Referrals among AEs.
  3. WorkSpan Admin (WSA)—This persona is responsible for setting up the integration and maintaining the App. The permission set does NOT provide access to any business objects. Assign an additional permission set if you want your WSA to access Referral or Partner data.
  4. WorkSpan Read-Only User—This is a supplementary permission set for WSAs that provides read-only access to Referral and Partner data. Assign it if you want your WSA to be able to read sales data, but not edit any of it. If you want them to be able to edit as well, then assign WorkSpan Account Executive or WorkSpan Sales Ops Manager instead.
  5. WorkSpan Integration User—This is an artificial persona. All inbound requests are executed in this user’s context. Assign this permission set to the user whose credentials will be used to set up the integration in your WorkSpan environment. No human user (including admins) should be assigned this permission set: it is not required to use the App in any way, but it will allow users to break the integration unintentionally.

3. Flow Template to auto-create Referral from Opportunity

This template is incomplete Out-Of-The-Box (OOTB). If you simply activate it as is, then not only will it not work, but your users will start catching errors and won’t be able to edit their Opportunities.

You will need a “Modify All Data” system permission on your profile in order to activate this flow template because it is run in a system context.

This template allows to auto-create a Referral from an Opportunity (see 3.1.2) when it meets certain criteria. OOTB, it will auto-create a Referral for the same Partner under the same Opportunity only if it doesn’t already exist (doesn’t matter if the existing one was created manually or not). However, a key piece of information for a Referral is your Partner. Since Opportunity doesn’t have a standard field that fits such a purpose, you need to create your own custom field for that and change some placeholder text in the template with your custom field’s API Name.

Here’s what you need to do.

  1. If you are going to use this template, then all users in your organization who will be working with Opportunities (doesn’t matter if they also work with Referrals or not) should be assigned either WorkSpan Account Executive (recommended) or WorkSpan Sales Ops Manager (not recommended, since it provides too much access) permission set.

If you don’t do this, then when a user without a proper permission set will update an Opportunity to meet the criteria and trigger Referral auto-creation—they will catch an error. And, not only the Referral wouldn’t be auto-created, but the Opportunity will not be updated as well.

  1. Create a text (255) field on Opportunity to store the Partner ID from WorkSpan, called, for example, WorkSpan Partner ID.

mceclip4.png

  1. Go to Setup > Flows and click on “Auto-create Referral from Opportunity.”

mceclip5.png

  1. In the Flow canvas, double-click on the Start element.

mceclip6.png

  1. Define the Entry Object as “Opportunity.” So, the flow is triggered whenever an “Opportunity” is created or updated.

mceclip7.png

  1. Scroll down to “Set Entry Conditions.” OOTB, the template only has one condition: when the Probability goes over 20%. And while the Flow can work like that, we strongly recommend to add at list one more condition: that your custom WorkSpan Partner ID field is not blank. To do that, click  + Add Condition.

mceclip8.png

  1. In the Field field, scroll down or search for your custom WorkSpan_Partner_ID__c field and click on it.

mceclip9.png

  1. Set Operator to “Is Null’ and Value to “{!$GlobalConstant.False}”

mceclip10.png

You can also add more conditions that make sense for your business, e.g., if the Amount reaches a certain number.

  1. Click Done.
  2. Double-click on the “Get Records Search Referrals.”

mceclip11.png 

  1. Scroll down to the list of filters and note two placeholder texts.

mceclip12.png

  1. Click into each of those Value fields, then scroll down or search for ‘$Record Opportunity’ and click on it.

mceclip13.png

  1. Then scroll down or search for “WorkSpan_Partner_ID__c” and click on it.

mceclip14.png 

  1. Repeat for the other field.

mceclip15.png 

Click Done.

  1. Back on the canvas, double-click on “Assignment Opportunity and Partner Assignment.”

mceclip16.png

  1. Scroll down and note the placeholder text.

mceclip17.png 

  1. Click into the Value fields, then scroll down or search for ‘$Record Opportunity’ and click on it.

mceclip18.png

  1. Then scroll down or search for “WorkSpan_Partner_ID__c” and click on it.

mceclip20.png mceclip21.png

Click Done.

  1. In the top right corner of the canvas, click Save As and then Activate.

mceclip3.png

 

4. Managing Opportunities to auto-create Referrals

  1. Once the flow template is ready, go to the desired opportunity (let’s say “Dickenson Mobile Generators) and set the condition (>=20%) as mentioned in your flow. For e.g., the probability is set to 30%. Click “Save.”

mceclip2.png

  1. Refresh the Opportunity page and click on the “Referrals” tab, as shown below. You can view the auto-created referral from this opportunity. Click on the arrow icon to go to the detailed page of the referral.

mceclip1.png

  1. You are redirected to the detailed view.

mceclip0.png

5. Configure Default Values for New Referrals

The Referral object represents an offer from a company to its partner to collaborate on an Opportunity. Hence, a lot of Referral data is likely to be the same as Opportunity (and its related records’) data. But not necessarily, and an AE should always be able to make a decision about which data to share, which to keep, and which to alter. The “Default value” option works in two ways. It defines either (a) the Opportunity fields from which to pull values or (b) literal constant values to use when creating an Outgoing Referral (see Outgoing Flows (3.1)). Option (a) is also applied when linking a Referral to an Opportunity (see Linking Referral to Opportunity (3.2.2)), while option (b) is not. In all the cases, the values are only provided as default values; AE can edit them before saving the record (except for bulk creation (see 3.1.3) and auto-creation (see 3.1.2) because no distinct user interaction is possible in those cases).

Note: The mapping is only applied at the moment when you Create an Outgoing Referral (refer to 3.1.1) or Link Referral to an Opportunity (refer to 3.2.2) in Salesforce. It is NOT applied when a Referral is created from WorkSpan, and it is NOT applied at any other time inside Salesforce. I.e., there is NO ongoing sync between the Opportunity and Referral records provided by code in the package. However, there are Flow Templates (refer to 2.9.1) in the package that you can use to do something like that. Or you can ignore that and implement something from scratch using standard Salesforce automation tools.

 

6. Default Ready for Submit Field Value

Ready For Submit is a unique technical field. It controls whether the data will be sent from WorkSpan to the partner or to another system. However, it does NOT affect the exchange between Salesforce and your WorkSpan instance: the data is sent to WorkSpan regardless of the field’s value. Also, this (and every other) default value is only applicable to Referrals created in Salesforce. Referrals created in your WorkSpan instance and synced to Salesforce via the integration (see 2.16) are not affected by the default mappings.

Out-of-the-box (OOTB), the default Ready For Submit value is ‘No.’ It means that the Outgoing Referrals are being created in a kind of ‘draft’ state. Aside from the special partner use cases, it mainly affects bulk creation and auto-creation. In both of the latter cases, if the default Ready For Submit value is “No,” then most field validations will be skipped. However, the user might not be able to edit or submit such Referrals without populating some fields first. Regular Referral creation is mostly not affected: the Referral does create with Ready For Submit = ‘No,’ but the user is not allowed to skip most of the field validations anyway.

The only way for the user to change Ready For Submit from ‘No’ to ‘Yes’ is by clicking the Submit Referral button (see 3.1.4). There is no way to change from ‘Yes’ to ‘No.’

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.