Skip to main content
Datapills
Tim Chung avatar
Written by Tim Chung
Updated over a week ago

Datapills are output data from a trigger or an action step. They are variables that you can use to map business logic into recipe steps. For example, to create a new Hive project from a Salesforce opportunity, you will assign datapills from the Salesforce opportunity to the Hive connector in recipe actions.

Data Types:

  • String

  • Integer or number

  • Date or datetime

  • Array/List

  • Boolean

When mapping datapills, it is important that they are 'type' compatible. Hive Automate will do default type conversions where it can be done with no ambiguity or loss of information.

In addition to mapping datapill as is, you can open the recipe steps in formula mode to transform data. In depth formula coverage will be provided in another article. However some of the data type conversion formulas are as follows:

  • .to_currency

    • This converts the data pill to a currency string output.

  • .to_date

    • This converts the data pill to a date output.

  • .to_f

    • This converts the data pill to a float/decimal output.

  • .to_i

    • This converts the data pill to an integer output.

  • .to_s

    • This converts the data pill to a string output.

  • .to_time

    • This converts the data pill to a time output.

These commands immediately after a datapill can help convert the output to the expected input of the field you are typing in.

Mapping constants vs mapping variables:

Input fields can be assigned variables (data pills) or constants (absolute values).

Mapping variables

The Salesforce variable Name has been mapped to the Hive Name input field. This means that for every new Salesforce Opportunity that is closed, the Opportunity name will be used as the title for the new Hive project. For example if the Salesforce Opportunity is named 'Customer XYZ - Implementation', then the Hive project will be titled 'Customer XYZ - Implementation'.

Mapping constants

On the other hand, we could write text in the input field instead like "Project created from Salesforce". Then all projects created from this recipe would have "Project created from Salesforce" as the title.

Best Practices:

  • Always double check that datatypes match between the input value and the expected input value of the data field.

  • Use formula mode to convert data types if needed.

  • Use datapills where you want the data to be dynamic, and text where you want the data to be static.

  • Always double check that you are using the correct datapill from the correct step in the recipe.

  • If you get an error, check the output of the step where the datapill came from to ensure that value was the data type you intended, so that you are passing the correct data type.

Did this answer your question?