As a Crank user, I should be able to check a field value on an Iterable Contact
Proposed Step Name: Check a field on an Iterable Contact
Proposed Step Expression: the (?<field>[a-zA-Z0-9_]+) field on iterable contact (?<email>.+) should (?<operator>be less than|be greater than|be|contain|not be|not contain) (?<expectedValue>.+)
Proposed Step Fields:
email (type EMAIL), the email address of the contact
field (type STRING), the API name of the field
operator (type STRING), the operator to use when comparing expected/actual values (one of be less than, be greater than, be, contain, not be, or not contain)
expectedValue (type ANYSCALAR), field value that is expected
Notes
Although the API uses the terminology User, the terminology shown in the Iterable UI is always Contact, so let's go with that.
Also note: all profile fields on a contact are nested under a dataFields key on the returned user object. We should treat those user fields as flat / at the same level as the email address.
As a Crank user, I should be able to check a field value on an Iterable Contact
Proposed Step Name: Check a field on an Iterable Contact Proposed Step Expression:
the (?<field>[a-zA-Z0-9_]+) field on iterable contact (?<email>.+) should (?<operator>be less than|be greater than|be|contain|not be|not contain) (?<expectedValue>.+)
Proposed Step Fields:
email
(typeEMAIL
), the email address of the contactfield
(typeSTRING
), the API name of the fieldoperator
(typeSTRING
), the operator to use when comparing expected/actual values (one ofbe less than
,be greater than
,be
,contain
,not be
, ornot contain
)expectedValue
(typeANYSCALAR
), field value that is expectedNotes
User
, the terminology shown in the Iterable UI is alwaysContact
, so let's go with that.dataFields
key on the returned user object. We should treat those user fields as flat / at the same level as the email address.iterable.users.get()
will look up a contact by email: https://github.com/geoffdutton/iterable-api/blob/master/lib/resources/users.js#L24