Type Coercion

Rita Pang
Rita Pang
  • Updated

The below chart shows how AlayaCare Connector behaves, when it receives values in expected and unexpected data formats.

Expected Received Description
array array The value is handed over unchanged.
array other If the received value is not of the array type, AlayaCare Connector will create an array and the first (and the only) element will be the received value.
boolean boolean The value is handed over unchanged.
boolean number The value is converted to logical Yes, even if the value is 0.
boolean text If the value is equal to false or the value is empty, it is converted to logical No. If not, it is converted to logical Yes.
boolean other The value is converted to logical Yes whenever the received value exists (is not null).
buffer buffer The value is handed over unchanged only if the codepage is as expected. If the codepage differs, AlayaCare Connector will try to convert the received value to the requested codepage. If this conversion is not supported, AlayaCare Connector will return a validation error.
buffer boolean The value is converted to text (true/false) and then to binary data following the steps mentioned above for converting to text.
buffer date The value is converted to ISO 8601 text and then to binary data following the steps mentioned for converting to text.
buffer number The value is converted to text and then to binary data following the steps mentioned above for converting to text.
buffer text The value is converted to binary data and encoded as expected. If the expected encoding is not specified, utf8 encoding will be used.
buffer other AlayaCare Connector returns a validation error.
collection collection The value is handed over unchanged.
collection other AlayaCare Connector returns a validation error.
date date The value is handed over unchanged.
date text AlayaCare Connector will try to convert the text to a date. If the conversion fails, it will return a validation error. Date must contain day, month and year. Date may contain time and time zone. Default time zone is based on your settings. Examples:

2016-06-20T17:26:44.356Z

2016-06-20 19:26:44 GMT+02:00
2016-06-20 19:26+0200
2016-06-20 17:26:44
2016-06-20

2016/06/20 17:26:44
2016/06/20 19:26:44+02:00
2016/06/20 17:26
2016/06/20 5:26 PM
2016/06/20

06/20/2016 17:26:44
06/20/2016 19:26:44+02:00
06/20/2016 17:26
06/20/2016 5:26 PM
06/20/2016

20.6.2016 17:26:44
20.6.2016 19:26:44+02:00
20.6.2016 17:26
20.6.2016
date number AlayaCare Connector will treat the number as milliseconds since Jan 01 1970 (UTC) and convert it to a corresponding date.
date other AlayaCare Connector returns a validation error.
number number The value is handed over unchanged.
number text AlayaCare Connector will try to convert the text to a number. If the conversion fails, it will return a validation error.
number other Integromat returns a validation error.
text array If the given array supports conversion to text, the value will be converted. If not, AlayaCare Connector will return a validation error.
text text The value is handed over unchanged.
text boolean The value is converted to text (true/false).
text buffer If text encoding is specified for binary data, the value will be converted to text. If not, Integromat will return a validation error.
text date The value is converted to ISO 8601 text.
text number The value is converted to text.
text other AlayaCare Connector returns a validation error.
time time The value is handed over unchanged.
time text AlayaCare Connector will try to convert time to the hours:minutes:seconds format. If the conversion fails, it will return a validation error.
time other AlayaCare Connector returns a validation error.

Was this article helpful?

0 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.