I'm developing a workflow for converting a lead into a customer with an ongoing service contract.

The progress of process is governed by external factors checking out. I would typically use a finite state machine to manage these these states and transitions.

I plan to use the Flow builder to implement a visual wizard and the process flows for the third part integrations.

I'm rather uncertain about what sort of record field should I be using, if my FSM was backed by a conventional RDBMS I would have a category lookup table. I'm aware that Salesforce includes a number of specialisation of lookup tables, enumerated fields and metadata records.

How would you approach this requirement? Custom metadata seems to be good approach to this, do you see any issues with this approach and how might they be avoided?


I received no answers but I was able to solve this myself which I'm posting incase anybody else needs to solve this problem in the future.

  1. Create a Metadata Type for the the state.
  2. Add an entry for each state.
  3. Only developers/administrators can added or remove status.
  4. A field of this type can be added to the customer record
  5. Create a Apex class that provides a method for each valid state transitionenter link description here.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.