We’ve run into an issue when using choice sets between tenants.
Create a choice set with options A, B, C in Dev tenant
Assign choice set to entity
Include the data service entity in a project in Dev
Publish project to Dev Orchestrator and test
Create the same choice set in Prod tenant, but enter them in a different order at creation, C, B, A
Move published package from Dev tenant to Prod tenant (via upload, not studio publishing)
When running the automation in Prod the choice set will be using the incorrect values. Requesting the value of C will return A, A will return C.
It seems that the choice set is based on an enum whose value is determined based on the order the values are added to the choice set at creation. This enum is not displayed anywhere however, and all choice sets display in alphabetical order once they’ve been created. The only way to know what order the choices need to be created in Prod is to remember what order you made them in Dev, and if you get it wrong your process will interpret them wrong. If choice set options were created in the wrong order the whole thing must be deleted and made again from scratch, adding the choices in the correct order without mistakes. Then, if it’s already been added to a field in an entity, it can’t be deleted until it’s removed from that field. The field also can’t be changed to make it say text or a different choice set, it has to be deleted and remade and all data in that entity re-added. So, to re-make a choice set you have to delete all fields in all entities that use it and re-populate all that data in all of them later once you re-make the choice set.
Alternatively, you can open the project in Prod tenant studio and update the data service, which will grab the new choice set enum, then you re-publish to Orchestrator. This is not a desirable solution though, because then the data service needs to be refreshed twice, once in dev and once in prod, every time you need to implement and publish a change. Three times if you’re also working in a QA or Test environment between Dev and Prod.
Is re-importing the data service in every tenant the recommended way to use Choice Sets? Everything else works across tenants without needing to re-import data service entities so long as the names are correct.