Skip to main content

So here's the deal.

 

My company handles several locations. When we get a new sales opportunity for any of these locations we are given random "feasibility" questions for each site to respond to. These questions vary widely as do their responses from each site. Sometimes they are duplicate questions that we have been asked before from a different opportunity or they are completely new. 

 

My ultimate goal is to take the responsibility of answering these questions off each individual site and answer it myself based on their prior responses instead. This of course will save us time/effort and make everything more efficient but short of adding 600+ questions and answers to salesforce as a related object I was wondering if there was an easier way. 

 

I need each group of new questions tied to the opportunity but the answers tied to the locations. I currently have a bridge form where I keep the site information. But since the questions will be new each time and the answers are per-location, I don't know how I can set this up in the system, especially since I don't want to be doing 4x the work adding both questions and answers for each site. 

 

Ex: I only have to add in 5 questions to the Opp  but since I have 4 sites, I'll have 20 answers. 

 

Of course this all needs to be able to be pulled into a report where I can filter by questions/answers/sites/and other custom fields on both objects....

 

Any help would be TREMENDOUSLY appreciated.

 

#Service Cloud #Experience Cloud

1 respuesta
  1. 15 nov 2023, 14:35

    Hi Capri, 

     

    This can be a little tricky. One route, though not ideal is to just add these questions as custom fields, which you can then dynamicaly render on the page based on the location. The downside though is that this is not very scalable, and you can easily eat up your field limits depending on how many questions there are. 

     

    A series of custom objects could also be used here, but those have their own downsides as well, such as data storage, and increased complexity. 

     

    What you could maybe do is something like having a Master Object that serves as the template. 

     

    Question: Text Field

    Location: Text Field

    Question Type: Picklist (Text/Dropdown/Boolean)

    Values: Text Field (This could be a comma separated list of picklist values)

     

    Then, you could use a flow to try and grab these questions based on the location of the Opportunity. 

     

    I think custom code would probably work best here, because you could put an LWC in the flow and then do something such as render the question based on the template. For example, the LWC could fetch all the questions in that location, and then if the question type is dropdown, it displays a dropdown with the comma separated values from the template, and similarly for other types of questions. 

     

    You could maybe do this with some of the unofficial flow sf components, such as the Magic Picklist one which I believe lets you use comma separate values for on-screen picklists. 

     

    Anyways, you could then save these questions and answers on another object related to that Opportunity. This object could have 4 fields: 

    • Question (Text)
    • Answer (Text)
    • Opportunity (Lookup)
    • Location (Text)

    You could stamp the question and answers from the flow in these text fields, and then populate the lookup field so it's related to that opportunity

0/9000