Product: Omatic Cloud

Description: This solution walks through taking a yes/no value and setting it to true/false within your system of record (or vis versa). 

Environment: All

Versions: All


In Omatic Cloud, you can use data transformations to take a value provided and change it to something more relevant to the destination system. 

You may sometimes want to set a yes/no or true/false to the opposite value. For example, your incoming data has an Accepts Email field. In your data source, that value can be set to true or false.  In your system of record (i.e. the destination system), you want to send that data to Email-Opt Out. So, if someone has indicated they will accept email, the value from your source is 'True'. You'd need to transform that value to "False" to properly assign an Email Opt-Out value in the destination. To do this, you will use a data transformation. 

Navigate to the field you need to apply the transformation to and map the appropriate incoming data. Next, click the gear icon, then select Transform.

In this example, we will be mapping AcceptsEmail from the source to Email Opt-Out in the destination. On the left-hand column ("What will be written to Email Opt-Out"), you will indicate how you want your data to land in your destination. On the far right-hand column, you will list the possible values that can come from your source ("What is provided by AcceptsEmail"). 

If someone is marked as Accepts Emails in the source, we want the Email Opt-Out in the destination to be false. Since all data transformation are evaluated in order, we can't simply set the incoming "True" value to "False" on the first row, then set an incoming "False" to "True" on the second row. This would cause an incoming "True" value to first be set to "False", then to immediately get set back to "True" when the second row is evaluated with the results of the first row. To work around this, we introduce an intermediate value that we don't expect to receive from the source system - in this case "0", since the source system is only expected to send "True" or "False." Next, if the incoming value is "False" (as in they do not accept emails), then we want Email Opt-Out set to true. Now that we've dealt with the two possible values from the source system ("True" and "False"), we need to look for that intermediate value we set earlier ("0") and transform it to the final vale we want, which is "False."