Skip to content

Create Visit Records and Track Number of Visits

In this guide we will demonstrate how to create Site visit records with Formyoula mobile forms that are linked to an existing or newly created Contact record. The number of times visited also will be captured by the form.


1. Create a custom object in Salesforce called “Visit”.




2. Create a custom Master-Detail Relationship field for the Visit object that is related to the Contact object.




3. Create a Roll-Up Summary field on the Contact object.




4. Select the Visit object from the Summarized Object list. This will ensure to count how many times client has visited.


5. Select “Count” from the available options. This will ensure that the field will count and add times based on how many times client has visited.



6. Next create a Formyoula form with all the fields necessary for Contact record creation. Add the Salesforce Lookup element for Contact object in case if the Contact already exists in Salesforce and is visiting repeatedly.



7. Next we will add two Salescorce connections. First for the Contact object and second for the custom Visit object.


Click on “(Add)” under the “Connections” column or click on the “Create a Connection” button, or select “Add/Edit Connections” from the “Actions” available list.



8. Select “Salesforce” from the available connections list and click “Create Connection >>”.



9. Select “Contact” from the available Salesforce Object list and click “Save”.



10. Set the “Insert Sequence” as “1”. This will ensure to create the new Contact record prior to the new Visit record.



11. Select your lookup field from the list to ensure that Visit records will be created and counted if the Contact is visiting repeatedly. In this case we named the lookup field as “Find Contact”.



12. Click “Save Record Settings” when done.



13. Map all the necessary field for your Contact record.



14. When done, click on the “<< Back to Connections” button.



15. Select “Salesforce” from the available connections list and click “Create Connection >>”.



16. Select “Visit” from the available Salesforce Object list and click “Save”



17. Set the “Insert Sequence” as “2”. This will ensure to create the Visit record after the Contact record is created or updated.



18. Click “Save Record Settings” when done.



19. Map the lookup field from your Formyoula form to the Master-Detail Relationship field. In this case the field is called Contact (Contact__c). This will ensure to add the Visit record to an existing Contact record.



20. Map the [New Contact (Seq 1)] field to the Master-Detail Relationship field. In this case the field is called Contact (Contact__c). This will ensure to add the Visit record to the newly created Contact record.



21. When done, go to your Formyoula dashboard.



22. Click on the “Try” button next to the form. This will open the mobile web app.



23. Select the newly created form.



24. First we will use the option to create a new Contact record if the client is visiting for the first time. Capture the details and submit the form.



25. Now in Salesforce you will be able to see the newly created Contact record as well as the new Visit record and the number of times visited.




26. Next we will use the option to find the Contact record via the Salesforce lookup field if the client is visiting repeatedly. If found - leave the rest of the fields empty and submit the form.



27. Now in Salesforce you will be able to see the existing Contact record updated with an extra Visit record and the number of times visited will be automatically increased to 2.





For any questions please contact us - support@formyoula.com.






Feedback and Knowledge Base