amqp Request Step

The amqpRequest uses the AMQP protocol to post a message to an MQ server, e.g., RabbitMQ, etc.

{
  "id": 373,
  "onSuccess": [ "some-other-step" ],
  "onFailure": [ "some-step-to-handle-failure" ],
  "name": "send-amqp-event",
  "type": "amqpRequest",
  "properties": {
    "body": "${steps.transform-event.response}",
    "url": "amqp://otqaqsml:tPpXwTl7-iMtezRmyJmD-y2U_XbroYpW@jaguar.rmq.cloudamqp.com/otqaqsml",
    "exchange": "",
    "queue": "myqueue"
  }
}

Element Request Step

This step makes an API call to a specific Element Instance.

Required properties:

Optional properties:

Note: These optional parameters need be references to an object from a previous step in the formula.

{
  "name": "get-contact",
  "type": "elementRequest",
  "onSuccess": [ "some-other-step" ],
  "properties": {
     "elementInstanceId": "${crm.instance.id}",
     "method": "GET",
     "api": "/hubs/crm/contacts/{objectId}"
  }
}

Element Request Stream Step

An Element Request Stream is used to stream a file from one Element Instance to another. In this step, you are outlining two API calls instead of just one. These are separated by using download to refer to the first API that will download the data and upload to refer to the second API call which uploads the data. The response body of the download request is used as the request body of the upload request.

Each of the two API calls in the Stream Step have the same properties as an Element Request Step.

Filter Step

Custom Javascript that must return true or false.

{
  "name": "contact-filter-step",
  "type": "filter",
  "onSuccess": [ "some-step" ],
  "onFailure": [ "some-other-step"]
  "properties": {
    "body": "done(trigger.event.objectType.toUpperCase() === 'CONTACT' && trigger.event.eventType === 'UPDATED');"
  }
}

Formula Step

Executes a different formula instance.

{
  "name": "a-sub-formula-step",
  "type": "formula",
  "properties": {
    "formulaId": "OTHER_FORMULA_ID"
  }
}

http Request Step

Makes an HTTP/S call to any URL/endpoint.

Required properties:

Optional properties:

Note: Thes optional parameters must refer to an object from a previous step.

{
  "id": 372,
  "onSuccess": [ "some-other-step" ],
  "onFailure": [ "some-step-to-handle-failure" ],
  "name": "send-event",
  "type": "httpRequest",
  "properties": {
    "method": "POST",
    "query": {},
    "path": {},
    "headers": {},
    "body": "${steps.transform-event.response}",
    "url": "http://localhost:2222/events"
  }
}

Loop Step

Loops over a list of objects from a previous step or trigger.

To Use a loop step:

Notification Step

Custom Javascript that must pass a boolean to the done callback. If true, an email will be sent to the registered "notification email" address for the formula instance.

Retry Formula Execution Step

Retries a formula instance execution with the same input data. The number of retry attempts can be configured, with a maximum of 5 attempts, and the retry time is set based upon an exponential backoff in minutes. The equation used for the exponential backoff is round(e^x) where x is the retry attempt number.

Required Property:

Request Step

Makes an API call to one of our platform APIs.

These steps will look the same as any elementRequest, except that they do not need an elementInstanceId property. This is because these API calls are not element instance API calls, but instead just calls to one of our platform APIs.

{
  "name": "get-instances",
  "type": "request",
  "onSuccess": [ "some-other-step" ],
  "properties": {
    "api": "/instances",
    "method": "GET"
  }
}

Script Step

Custom Javascript that must pass a valid JSON object to the done callback. The javascript here is powered by Node.js and has the following packages available to it:

{
  "name": "build-email-json",
  "type": "script",
  "onSuccess": [ "send-email" ],
  "properties": {
    "body": "done({ body: { subject: 'Contact Updated', message: 'Contact ' + trigger.event.objectId + ' was updated', to: 'frank.ricard@old-school.com', from: 'joseph-pulaski@old-school.com' } });"
  }
}