How to integrate two apps within Quixy using triggers
  • 5 Minutes to read
  • Contributors

    How to integrate two apps within Quixy using triggers


      Article Summary

      In Quixy, triggers are also called as internal integrations because we use them only to integrate apps within Quixy (apps may belong to same workspace or different workspace) but not to integrate to any 3rd party applications.

      Triggers are used to connect any two applications which may belong to same workspace or different workspaces within Quixy. The application from which you create triggers acts as the source application and the application which you connect to this source application acts as the destination application.

      Triggers work as follows: When an action is performed in the source application, a task is generated in the destination application to perform an action, either manually or automatically, depending on the triggers configuration.

      EXAMPLE

      An organization has two HR professionals on staff (Raman and Raghav). Raman conducts interviews to recruit people and updates the information in the Employee Details app, while Raghav updates the hired people's salaries in the Salary Details app based on their department.

      Now, depending on the trigger configuration, when Raman updates the employee information in the Employee Details app and submits the record, either Raghav receives a task to manually update the salary in the Salary Details app and submit the record, or the salary is automatically updated in the Salary Details app and the record is submitted automatically without any manual involvement.

      What are the distinct ways triggers operate?

      Triggers work in two distinct ways:

      1. Submit Add Record: When two apps are linked via triggers, when you add data in the first app and submit the record, the necessary data in the second app is automatically populated and the record is submitted without any manual intervention.
      2. Create Task: When two apps are linked via triggers, adding data in the first app generates a task for the user present in the workflow of the second app, who can then add the necessary information in the second app and submit the record.

      Let's use the above example as a use case and create triggers (Submit Add Record)

      As you are (Probably) creating a trigger for the first time, you should know that the applications for which you are creating triggers should have some element fields in common so that you can collaborate the applications using those fields. 

      If you are reading article about triggers, you must probably know how to create a simple application.

      Create the Employee Details app and Salary details app with the form elements given below:

      For Employee Details app:

      • Employee ID - Number Field
      • Employee Name - Text Box Field
      • Department - Text Box Field
      • Date of joining - Date Field (Current Date)

      For Salary Details app:

      • Employee ID - Number Field
      • Employee Name - Text Box Field
      • Department - Text Box Field
      • Date of joining - Date Field (Current Date)
      • Annual Salary - Number Field

      Hope you have completed creating both the applications. Now, lets start implementing the use case and create triggers.

      Open the Employee Details app in view mode, click the 3-dot menu on the top right corner of the page and select TriggersOn the app triggers page, click on the Add tab to start configuring the triggers.

      To configure triggers you need to fill the details, first start with selecting the Workflow Step and Workflow Step Action

      What is a Workflow Step and Workflow Step Action?

      1. When the application reaches the workflow step the trigger gets activated and on clicking the workflow step action the trigger starts working.

      2. Now, Select the To Workspace where your salary details app is created and saved to which you want to connect the employee details app. Upon selecting the workspace, you need to select the application in To App field, in this case the app will be Salary details app.

      3. Next, select the Submit Type. This is the important part of the configuration, an action will be performed in the salary details app according to the option what you select in this field. For now, select the Submit Add Record option. 

      4. User Reference field is not useful for Submit Type: Submit Add Record because we are not creating any task for the destination app and assigning that task to any user to take any action.

      5. Select the Type as Single, if you only have individual elements that need to be mapped from the source application (Employee details app) to the destination application (Salary details app).

      6. Select the Type as List, if you have a sub form/grid in the source app whose elements need to be mapped to the destination app. If you want to put any condition based on which the trigger should work, click Add Rule and configure the condition. For example: If you want the trigger to work only when the department of the employee is Product.

      7. After filling all the details, Click Create Mapping to map the elements from the Salary details app to Employee details app.

      8. Since, we need to submit a record in the salary details app automatically without any manual intervention, we should make sure about the data which need to be retrieved into salary details app and we should pass a static value to the salary column. After filling all the details click Save.

      By now, you should have an understanding on how to create triggers (Submit Type: Submit Add Record)

      Let us use the same example as a use case and create triggers (Create Task)

      To create triggers (Submit Type: Create Task), follow the same process how you created the trigger for Submit Type: Submit Add Record; Select the Workflow Step and Workflow Step Action; Select the To Workspace and To App; Select the Submit Type as Create Task. 

      User Reference Field is mandatory when you create triggers (Submit Type: Create Task) because you need to create a task for a user to take an action in the destination app. The user reference field drop-down will contain the email address fields present in the source app (i.e., Employee details app). So, when you enter an email address of a user in the selected email fields, a task will be created for that user.

      NOTE
      If you are creating a trigger with submit type as create task, it is advised to put a dedicated email address in the source application field where you can enter the user email address which you can select in the User Reference Field.

      1. Select the Type as Single or List according to your requirements and add rule to the trigger if necessary.

      2. Click Create Mapping, map the elements present in the source application to the destination application.

      3. While mapping the elements, you will see two fields (Start Date, End Date) which may not be there in your application, these are actually used when we have any recurring kind of task which needs to be started at some point of time and stopped after some time.

      4. Click Save to save the trigger.

      Here are some best practices that you need to follow while configuring the feature to use the feature in a best way.

      To get a visual understanding on how the triggers (Submit Type: Create Task) work, refer to the video below.

      To get a visual understanding on how the triggers (Submit Type: Add Record) work, refer to the video below.





      Was this article helpful?

      What's Next