run-crank/cog-salesforce

New Step: Check a field on a Salesforce Object

Closed this issue · 0 comments

As a Crank user, I should be able to check the value of a field on any Salesforce object via step

Proposed Step Name: Check a field on a Salesforce Object
Proposed Step Expression: the (?<field>[a-zA-Z0-9_]+) field on salesforce (?<objName>[a-zA-Z0-9]+) object with id (?<id>[^\s]+) should (?<operator>be less than|be greater than|be|contain|not be|not contain) (?<expectedValue>.+)

Proposed Step Fields:

  • field: (type STRING) Field name to check
  • objName: (type STRING) Salesforce object name
  • id: (type STRING) Object ID
  • operator: (type STRING) Check Logic (be, not be, contain, not contain, be greater than, or be less than)
  • expectedValue: (type ANYSCALAR) Expected field value

Proposed Step Records:

  • salesforceObject (type KeyValue, named Checked Object), returned when an object was found, regardless of step outcome. Guaranteed fields should include:
    • Id (type STRING) Object's Salesforce ID
    • CreatedDate (type DATETIME) Object's Created Date
    • LastModifiedDate (type DATETIME) Objects's Last Modified Date

Note: this step will naturally overlap with existing object check steps. That's okay!