Learn how to connect Engini to Expensify.
Getting Started with Expensify #
Prerequisites #
- Access to Expensify admin account through Expensify.
- Retrieve your partnerUserID and partnerUserSecret details.
To learn more about the authentication, click here Authentication.
Add an Expensify connection in Engini #
- Enter your Engini account at https://app.engini.io.
- Navigate to Connections page by clicking on the Connections on the left sidebar or by clicking here.
- Click on the Add connection option located at the topbar.
- Choose Expensify option from the available applications.
- Enter the following details in “Add Connection” form:
- Connection name
Enter a unique and descriptive name for this connection. This name will help you identify and manage the connection in your Engini account. ‘Expensify’ is the default name. - Partner user ID
Enter the parnterUserID you retrieved from your account in the ‘Getting Started with Expensify’ section. - Partner User Secret
Enter the partnerUserSecret you retrieved from your account in the ‘Getting Started with Expensify’ section. - Employee Email
You may choose to enter your employee email address, it’s optional. - Press ‘Save’
- Connection name
Actions #
Create Expense
#
Creates a new expense for an employee in Expensify.
- Employee Email
Enter the employee’s relevant email address. If left empty, we will use the default email that was defined in the connection. The expenses will be created in this account. - Merchant
Select the name of the merchant for the expense. - Amount
Select the amount of the expense, in cents. - Currency
Enter a three-letter currency code value for the relevant currency type of the expense. - Created Date
Choose a relevant date for expense creation in the format yyyy-MM-dd. - Add Field
By clicking the “Add field” button, you can choose how to fill in various fields in the expense you are creating. You can add one field or more fields to the activity.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you wish to populate.
Create Policy
#
Creates a new policy in Expensify.
- Policy Name
Choose a policy name. - Add Field
Click the ‘Add field’ button to select the field you want to fill in.- Choose from the drop down the ‘Plan’ field you want to fill.
- Specify the plan of the policy. Click on the empty field to the right of the drop-down to view the tooltip displaying all the options available for filling the field. If not specified, the new policy will be created under the team plan.
- Select ‘Team’ or ‘Corporate’.
Get Policy
#
Retrieves an existing policy.
- Policy ID
- Click on the empty field on the right side to display the tooltip with all the options available for filling the field.
- Choose a policy from the tooltip.
- Fields[]
- This field expects to receive an array of the fields you want to retrieve for the policy. Click on the empty field on the right side to display the tooltip and use the ‘CreateArray’ function. To learn more about functions, click here.
- Click on the field on the right side to add the relevant fields to the array.
- Add Field
Click on the ‘Add field’ button to select the field you want to fill in.
- Choose from the drop down the ‘User Email’ field to indicate the user for whom you want to gather the policy list. Please note that you must have been granted third-party access by that user or company domain beforehand.
- Enter an email.
Get Policies
#
Retrieves existing policies.
- Add Filter
- If you prefer not to retrieve all the policies, you can filter them by clicking on ‘Add Filter’.
- After clicking on ‘Add filter’ you can choose which filters you want to apply and how.
- Choose from the drop down the field you want to filter by.
- Admin Only: choose whether or not to only get policies for which the user is an admin for.
- User Email: indicates the user for whom you want to gather the policy list.
- Select the condition you want the policy to meet for the selected field.
- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you wish to populate.
- You can populate the field in one of the following options:
Update Policy
#
Updates an existing policy.
- Policy ID
- Click on the empty field on the right side to display the tooltip with all the options available for filling the field.
- Choose a policy from the tooltip.
- Add Field
- Choose from the drop down the field you want to fill.
- In order to populate a field, first you have to initialize adapted variables and then use the outcome on the empty field on the right.
- Repeat steps 1-2 for all the fields you wish to populate.
Create Policy Expense Rule
#
Creates a policy expense rule in Expensify.
- Employee Email
Enter the employee’s relevant email address. If left empty, we will use the default email that was defined in the connection. The policy expense will be created in this account. - Policy ID
- Click on the empty field on the right side to display the tooltip with all the options available for filling the field.
- Choose a policy from the tooltip.
- Add Field
- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you wish to populate.
Create Report Template
#
Creates a report template in Expensify.
- Template Format
- Click on the empty field on the right side to display the tooltip with all the options available for filling the field.
- Choose a format from the tooltip.
- Name
The default name of the template is ‘Report Template.’ You have the flexibility to rename it according to your specific use case. - Add Template Fields
- Property
Click on the empty field on the left side and write the name for each property. - Value
Click on the empty field on the right side to be shown the tooltip with all the options you can use to fill the field.
Usually, you would choose to populate the field using the Field Options.- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value – select a value from the Field Options.
- Expression – using functions and/or properties and/or static values (Using the tooltip that opens when clicking on the field).
- You can populate the field in one of the following options:
- Add property
Repeat steps 1-2 for all the fields you wish to add to the template.
- Property
Export Report
#
Exports a report that was created within the workflow.
You can read more about this action here .
- Report Template
Select a report template that was created in the workflow which you want to export. - Add Field
- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- You can populate the field in one of the following options:
- Repeat steps 1-2 for all the fields you wish to populate
Initialize Objects Array
#
Creates and sets up an array, a structured collection of objects, which can be used for various purposes throughout your workflow.
- Name
By default, the array is named ‘objects array’, but you have the flexibility to rename it according to your specific use case. - Object Item Type
Define the type of objects from the drop down that will be stored within the array.
Map Object Type Array
#
We use this activity when there is an array of data that requires transformation into a different structure.
- Data List
Choose a data list that you’ve obtained from previous activities in your workflow. This data list contains an array of objects that you want to process and transform. - Object Element Type
Define the type of objects from the drop down that will be stored within the array. According to the object element type you chose, the fields in step 3 will be defined. To learn more about object element types, go to ‘Object element types’. - Add Field
By clicking the “Add field” button, you can choose how to fill in various fields.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- You can populate the field in one of the following options:
- Repeat steps 1-2 for all the fields you wish to populate
Append Item to Array
#
You can add an item to an existing array, allowing you to expand, and manipulate an array.
- Variable
Select an existing array variable from the dropdown in which you want to populate an item. - Add Field
By clicking the “Add field” button, you can choose how to fill in various fields.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- You can populate the field in one of the following options:
- Repeat steps 1-3 for all the fields you wish to populate
Update Employee
#
This activity allows you to update an existing employee.
- Employee Email
Enter the employee’s relevant email address. If left empty, we use the default email that was defined in the connection. - Manager Email
Enter the relevant email address of the employee’s manager. - Employee ID
Select the employee ID. - Policy ID
Select the relevant policy ID for the employee. - Add Field
By clicking the “Add field” button, you can choose how to fill in various fields.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- You can populate the field in one of the following options:
- Repeat steps 1-3 for all the fields you wish to populate.
Object Element Types #
There are 4 object element types:
- Category– classification of the type of expenses. For instance, office supplies. You can read more about it here
- Report Field– a data that can specify details in a report. For instance, the data can be information about relocation. You can read more about it here
- Tag– a component which allows you to assign the expense to department, location and project.
- Tag Level– you can utilize one or more tags, each potentially containing sub-tags within a parent tag.
Read more about tags here