Configuring Smart Opportunities
The objective of this document is to configure smart opportunities. Smart opportunities is a powerful LISA BusinessPro feature which smartly generates subscription opportunities based on the existing active subscription plan dataset in LISA BusinessPro in D365-FO. This automation is quite valuable for sales-driven organisations where sales people can review automatically generated opportunities and then decide whether to take over ownership of the opportunity and pursue further upselling / cross-selling actions or whether to discard the opportunity. From the D365-FO side of the solution one is able to control smart opportunity generation in a granular manner to avoid having too many opportunities duplicated or having duplicate opportunities.
As at time of writing the functionality can generate two types of subscription opportunities:
- Subscription opportunities linked to an existing Subscription plan record trying to upsell add-on products to existing enabled products in the Subscription plan. For example: A customer is currently subscribed to “Silver streaming service” and an opportunity is generated for an “Extra streaming device” add-on.
- Subscription opportunities NOT linked to an existing Subscription plan which contains upsell/cross-sell products which are not necessarily add-ons to existing enabled products but are frequently applicable or “bought together” with the enabled product thus making it an opportunity for up-sell or cross-sell. For example: A customer is currently subscribed to “Silver streaming service” and an opportunity is generated to upsell to “Gold streaming service” or to cross-sell to “Silver telephony service”.
To make use of this functionality one must:
- be subscribed to LISA Reach Sales (based on Dynamics 365 Sales and Dataverse) and have any of the versions released in 2023 or later.
- be subscribed to LISA BusinessPro (based on D365-FO) and have the LISA BusinessPro January 2023 Wave 2 release or later
LISA REACH SALES (DATAVERSE) CONFIGURATION
The functionality requires the deployment of a smart opportunity key field on the opportunity and opportunity line (sometimes referred to as opportunityproduct) tables in Dataverse. This key field comes part of the LISA Reach sales solution and it is a string data type. However, if you already have records in the any of these two tables in the environment the key field needs to be automatically populated with a unique value for the key field to be correctly deployed by the platform. LISA Reach Sales ships a small tool that can help you generate these unique GUID values in this string field however you can use your own techniques to achieve the same thing if this tool does not work for you.
This tool can be accessed from Dataverse -> LISA Reach Sales -> Enterprise Subscription Automation -> Configuration -> Data Jobs -> Populate Smart Opportunity Keys.
To use the tool just create one record in this table. The Name field could be any helpful value you require and does not affect the functionality.
Enter a value for the fields “Opportunity Count” and “Opportunity Line Count” and click the “Save” button. Every time the “Save” button is clicked the amount of records specified will be updated with a unique smart opportunity key. If you get an error then it means that the values inputted are too large and the standard Dataverse platform timeout has been exceeded. Lower the values in the two fields and try again. Note: It does not matter in which order the entities are updated.
Please ensure that any dual-write maps or other integration flows for these two tables are turned off while the tool is running.
LISA BUSINESSPRO (D365-FO) CONFIGURATION
The configuration for Smart Opportunities in LISA BusinessPro (D365-FO) starts in Enterprise subscription automation -> Enterprise subscription automation parameters -> Smart Opportunities.
- Smart opportunities time fence – Default value (in days) for the time fence to be applied to new program types created. The time fence defines the number of days that have to pass before a specific subscription plan is re-considered for generation of smart opportunities.
- Default sales manager – The default sales manager to use for the generated opportunities when the subscription plan is not linked to a sales manager.
- Test mode on – generates a dummy opportunity with one opportunity line for testing of dual write mappings or other testing. Should not be turned on in a production environment.
- Default price list – The default price list value to use for the opportunity. This is a mandatory field in D365-Sales so a default value must be specified here and the value can then be overridden by the sales person in D365-Sales, if needed.
- CDS sync limitation threshold – Since DualWrite and Dataverse have their own synchronization and API limitation here you can influence how many records are generated in one database transaction. If you encounter timeout issues then the value in this field should be reduced. This field is not relevant if dual write is not turned on and opportunity records are only being generated in D365-FO.
In the Data jobs tab in the same form one can find a data job to synchronize subscription opportunities for existing records. This data job will set the ‘Smart Opportunities Time fence (in days)’ field on the Subscription Plan, which will be inherited from the Program Type or Program Type Legal Entity (if exists for the current legal entity). Additionally, the ‘Next Smart Opportunities run’ field will be set to the current System Date. The job runs across all legal entities having subscription plan records.
The Smart opportunities time fence (in days) field can also be found on the program type. When creating a new program type the Smart opportunities time fence (in days) field is inherited from the Enterprise subscription automation parameters form. For Program type legal entity overrides the Smart opportunities time fence field value is copied from the parent program type.
When a new Subscription plan record is created the Smart opportunities time fence (in days) field is copied from the Program type or from the Program type legal entity overrides (if exists for the current legal entity). On the Subscription plan record one also finds the Next smart opportunities run field which is a date field and automatically initialized to the system date. The user can override this field, if required. This field is used by the Generate subscription opportunities batch job to determine whether the smart opportunities logic should be run against this specific Subscription plan record.
In order for the logic to generate meaningful opportunity data, cross-sell / upsell relationships must be configured. This is done in the standard Related products form. Then, in the standard Product relationship types form a new field called Use in smart opportunity generation can be found. When ticked, this product relationship type is marked as a meaningful relationship and will thus be processed by the Generate subscription opportunities batch job.
Besides the above configuration, once can additionally decide to exclude certain datasets from being processed by the Generate subscription opportunities batch job, This can be done by ticking the Exclude smart opportunities generation flag on any of the following:
- A specific customer
- A specific item
- A specific program type
- A specific subscription plan
Note that these flags on each of the above tables are not simply a default value but actual values that are checked by the Generate subscription opportunities batch job. If any of the above tables related to a subscription plan or subscription plan line is set to true then processing is skipped. For example, if you want to exclude all subscription plans of a particular program type from being processed then you would tick the Exclude smart opportunities generation flag on that specific program type. Another example would be if you would like to skip the generation of new opportunities for a specific customer (because the customer asked not be contacted about upselling opportunities) then you would tick the Exclude smart opportunities generation flag on that customer and all subscription plans and subscription plan lines for this customer are automatically ignored by the Generate subscription opportunities batch job irrespective of the value of this flag on the other tables. Another example would be if you would like to skip the generation of new opportunities for a specific item (because it does not make sense to generate subscription opportunities for this item) then you would tick the Exclude smart opportunities generation flag on that item and all subscription plans and subscription plan lines for this item are automatically ignored by the Generate subscription opportunities batch job irrespective of the value of this flag on the other tables.
The final piece of configuration for Smart opportunities would be to configure the batch job with your preferred recurrence (ideally once per day). You can also do a one-off synchronous run as per all standard batch jobs. This batch job contains the actual logic to go through all applicable the subscription plans and plan lines records and generate the actual opportunity header and line records. If the dual-write map is turned on, then the records are also generated in LISA Reach Sales (Dataverse) for review and uptake by sales people using LISA Reach Sales and D365-Sales in Dataverse. The batch job only processes subscription plans where the Next smart opportunities run field is equal or smaller than the system date and where the Exclude smart opportunities generation is set to false on the subscription plan, on the related customer and the related program type. Additionally, the batch job skips subscription plan lines where the related item has the Exclude smart opportunities generation set to true and also skips disabled subscription plan lines.
When a Subscription plan record has been successfully processed by the batch job the Next smart opportunities run field is automatically updating by adding the number of days configured in the Smart opportunities time fence (in days) field to the existing date value. This prevents the batch job from creating duplicate opportunities by only checking if can upsell/cross sell something on this next date and not before. Note that the user can still manually change the Next smart opportunities run field if subscription opportunities need to be generated before the next time fence.
If the batch job encounters any errors during processing the errors are logged in the HARP BusinessPro process log or in the standard logging of batch job history.
For subscription opportunities to also be created in Dataverse and thus available to users in LISA Reach Sales / D365-Sales, the dual write table maps shown in the screenshot below have to be turned on. These table maps should be turned off if this functionality of smart opportunities is not being used.