cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Static vs Dynamic fields

mppowe
Executive Chef I
Executive Chef I

I have a Use Case where we have an integration built between YouCanBookMe (YCBM) and an application built on Dynamics 365, where a booking is made in YCBM and sent to Dynamics. Right now the JSON payload has specific field names mentioned (eg personId, startDate, etc), and they're mapped to specific fields in the appropriate Dynamics table.


But I kind of wish I could make the recipe more dynamic. If they add a new field to the payload, then we need to edit the input schema for the recipe and map it to a new field in Dynamics. I'd like to be able to take in a dynamic list of field/value pairs in the JSON, and then dynamically create the record with those mappings.


But the Dynamics connector (and most connectors I've seen) don't allow that kind of dynamic, run-time determination of fields.


Another approach that I don't really like is to just have generic fields, say data1-data50, and as new fields are added they can reference one of those fields and then translate them downstream. I don't like that approach b/c the fields are not named and can be confusing, but is admittedly more "flexible" than hard-coding names.


2 questions:

1) Workato staff - is the dynamic approach I described for figuring out field names to use at run-time a possibility? Or a viable enhancement request?

2) developers - What's your opinion on using named inputs (but then any new fields require editing the recipe) versus generic, non-descript fields?

3 REPLIES 3

jakob-maynard
Deputy Chef I
Deputy Chef I

Dev here - Not an uber-good solution, but it should work. You could use a lookup table as a dynamic mapping, then, in the recipe, add a ruby/js script step to parse the payload into a list of objects with 2 fields, one for the key of the field, one for the value. Then, you can iterate on the list and grab the key mapping to Dynamics from the table. Then, format the data as Dynamics needs it and push it.

david-kreitter_
Workato employee
Workato employee

Yeah seems like it should be possible, in theory, given the MSFT API allows for updating entity definitions via the API: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/create-update-entity-definitions-using-web-api


That said, it could be a whole lot easier for users if Workato built a feature out to support this category of use case. So I like the idea for a product enhancement ๐Ÿ™‚

mppowe
Executive Chef I
Executive Chef I

Yes youโ€™re right, we could establish our own connection/action but yea I was hoping to leverage the existing connector that Workato has made.  And this may apply to all of their connectors, not just Dynamics.