Sweet Potato

Categories
Blog salesforce

Automating Case Creation for Subscription Products on Closed-Won Opportunities in Salesforce CPQ Using Flow

In subscription-based businesses, ensuring seamless post-sale processes is crucial. For one of my clients, this involved automatically creating Cases for each subscription product when an Opportunity was marked as Closed-Won. These Cases were assigned to the Fulfillment Team to kickstart service delivery. Here’s how I achieved this using Salesforce Flow, leveraging the Subscription object in Salesforce CPQ.

Understanding the Requirement

The client’s requirements were as follows:

  1. Opportunities marked as *Closed-Won* should trigger the automation.
  2. Cases should be created for each Subscription linked to the Opportunity.
  3. The Cases must be automatically assigned to the Fulfillment Team. Currently, there are 4 team members in the Fulfillment Team.
  4. Each Case should include essential product and subscription details.

Since the client uses Salesforce CPQ, the subscription object is central to the solution. This object tracks subscription products associated with Opportunities.

Solution Overview: Salesforce Flow

To meet these requirements, I designed a solution using Salesforce Flow. Here’s the step-by-step implementation:

#1. Trigger Point: Record-Triggered Flow on Opportunity

The automation begins with a Record-Triggered Flow on the Opportunity object. This flow runs when an Opportunity is updated, specifically when:

– Stage = `Closed-Won`
– IsClosed = `True`

#2. Get Records: Fetch Related Subscriptions

Once the Opportunity meets the criteria, the flow retrieves all related Subscription records. Use the Get Records element to query Subscription records where:
– SBQQ__Opportunity__c equals the current Opportunity’s ID.

#3. Loop Through Subscriptions

After fetching the Subscriptions, a Loop element is used to iterate through each record.

#4. Create Cases for Each Subscription

Inside the loop, the flow uses the Create Records element to generate a Case for each subscription. Here’s how the fields are mapped:

– Case Subject: `Case for [Subscription Name]`

– Product Details: Pull from the related SBQQ__Product__c record.

– Subscription Start/End Dates: Include the subscription period.

– Opportunity Reference: Link the Opportunity for context.

– Case Owner: Assign to the Fulfillment Team queue or round-robin among the 4 team members.

#5. Dynamic Case Assignment to Fulfillment Team

To distribute cases effectively among the 4 Fulfillment Team members:
– Implemented a Round-Robin Assignment mechanism using a custom formula or record-triggered flow to rotate case ownership.
Alternatively, the Fulfillment Team Queue can be set as the default owner for cases, and members can pick them as needed.

#6. Notifications and Alerts

Email alerts were configured to notify team members whenever new cases were created. This ensures the Fulfillment Team stays updated and can act promptly.

#7. Testing and Validation

Extensive testing was conducted to validate:
– Correct case creation for each subscription.
– Proper assignment of cases to the Fulfillment Team.
– Data accuracy in linking Subscriptions, Cases, and Opportunities.
– Notifications reaching the intended recipients.

Challenges Faced

#1. Handling Subscription Data

Since the client uses CPQ, ensuring accurate data flow from Quote Line Items to Subscriptions required close monitoring of the CPQ process. The Subscription data had to be fully synced with the Opportunity before cases could be created.

#2. Dynamic Case Assignment

Assigning cases dynamically to the Fulfillment Team was a key challenge. I used a round-robin approach to balance the workload effectively among the 4 team members.

#3. Flow Bulkification

Given the potential volume of Subscriptions, ensuring the flow could handle bulk records without hitting Salesforce governor limits was critical. I optimized the flow to process records in manageable batches.

Conclusion

This solution demonstrates the versatility of Salesforce Flow in automating complex processes, especially in subscription-based models. By leveraging record-triggered flows, dynamic case assignment, and email alerts, we delivered a streamlined process for post-sale case creation.

With this setup, the client now benefits from:

– Automated Case Creation for every subscription product on Closed-Won opportunities.
– Efficient Team Collaboration, ensuring no subscription fulfillment task is missed.
– Improved Operational Tracking of subscriptions and related cases.

If you’re looking to automate subscription management or streamline your post-sale processes in Salesforce, Flow is an excellent tool to consider.

Leave a Reply

Your email address will not be published. Required fields are marked *