Find all Contacts of a Company & create a task for each Contact

Go to UTrons (Only admins can create / manage UTrons). Choose One Time Changes UTron (We don’t need to do this repeatedly.)

 

You will see a wizard. You created your first UTron using wizard. For this tutorial, click Skip.

 

You create a flow (similar to flowchart) by adding steps (operations, conditions, etc.) to tell UTron what to do. When we use wizard, it creates an initial flow for us, which we can modify. In this case, you will see an empty flow.

  1. Click ‘+’ to add your first step. Since you can’t do anything before selecting records, it will only one option of ‘Select Records’. Click that.


  2. Select Records

    • We need to select records of type Contacts. So select table ‘Contact’.

    • Now we need to tell which Contacts we want to select.

      Here, usually, we give conditions like Source = ‘Web’, Country = ‘US’ etc. So all records that match these conditions get selected.

       

      We need choose all Contacts of a Company by giving condition Contact Company Name = (some value here).

      • Click ‘Select field & its condition’

      • Select field ‘Company Name’

      • It shows you different values of that field from your records. So if you choose field city, you might see options like New York, Paris, etc. So you can easily select your criteria. For now, select one of the companies that you see. The company should have atleast 1 contact else no contact will be selected and no task will be created. Remember the name. Click apply. Then click continue.


  3. Now you will see few more items on the flow. Lets understand them.

    • SelectedRecords: Notice the small tag just below Select Records. Select Records returns a list of records and further steps operate on these records. If you use Select Records multiple times, you will have multiple lists. So the operations need a way to tell which list they are referring to. So each list is given a name. By default it is similar to SelectedContacts. You can change this when adding Select Records (plural).

    • List Flow We are referring to the big block below Select Records. Once we have selected records, we need to act on these records one by one. You might even check some conditions and do different operations on different records. So records are passed, one by one, to the operations in List Flow. Most of your operations / logic will be inside this List Flow.

    • Current Record Notice the small tag at the start of List Flow. Just like we need a name to refer to list of selected records, we also need a name to refer to the record that is currently passed to List Flow. So, in operations, we can refer to its fields. You might be seeing ‘ContactRecord’. By default it is derived from ‘Singular’ in Select Records. You can change it by clicking the box indicating start of List Flow.

  4. Action – Create Task

    • Above step will select records that match given criteria. In our case it will be contacts of selected company. Now we need to tell what we want to do with each of the selected records. Click ‘+’ inside List Flow. Click ‘More’. Select operation ‘Create Task’,.

    • Set Task details

      • Task : My first UTron
      • When is it due : (leave as it is)
      • Category : Call
      • Who’s responsible : (select your name)
      • Related to : ContactRecord (associate with contact that is currently passed to List Flow)

    • Click ‘Save’

      Flow of your UTron is ready!

    • Click Test & Execute

    • It should show you preview of Tasks that are about to be created, under success.


    • Click Continue. Read & accept the conditions. And then execute.

    • After execution, your Tasks will be created. You can verify by going to Tasks page.

    Congrats on building a UTron flow on your own!