function resolveAction(action, data) {
  // copy action object
  action = Object.assign({}, action)

  // create populated condition string
  let populatedConditionString = action.condition.string
  action.condition.placeholders.forEach(placeholder => {
    // populate placeholder found in the condition string
    let populatedPlaceholder = Placeholders.populatePlaceholder(placeholder, data, 'null')

    // replace original placeholder string
    populatedConditionString = populatedConditionString.replace(
      placeholder.string,
      populatedPlaceholder
    )
  })
  action.condition = populatedConditionString

  // populate params
  let populatedParams = action.params.map(param => {
    // create populated param string
    let populatedParamString = param.string
    param.placeholders.forEach(placeholder => {
      // populate placeholder found in the param string
      let populatedPlaceholder = Placeholders.populatePlaceholder(placeholder, data, 'null')

      // replace original placeholder string
      populatedParamString = populatedParamString.replace(placeholder.string, populatedPlaceholder)
    })

    return populatedParamString
  })
  action.params = populatedParams

  // evaluate condition
  let condition
  try {
    // evaluate condition
    // eslint-disable-next-line no-new-func
    condition = false // (new Function('return ' + populatedConditionString))()
  } catch (e) {
    // signify that there was an error resolving the action
    action.resolveError = e
  }
  action.condition = condition

  return action
}
Resolves the placeholders in the action with the supplied data.

@param action {Object}
@param data {Object}