Create or Update a Contact
Use an Assignment Element to Set the Contact ID in the Record Variable
It’s time to build the elements for the Update Existing path. First, add the existing contact’s ID to the contact record variable. Remember, having all the values in one record variable makes it easier to update the contact, and that record variable needs to know which contact to update.
- On the Update Existing path, click
.
- Select Assignment.
- In the Assignment configuration panel, enter these values.
- For Label, enter
Set Contact ID.
The API Name is automatically set toSet_Contact_ID.
- For Variable, select contact > Contact ID.
- For Operator, select Equals.
- For Value, select Contact from Find a Match > Contact ID.

- For Label, enter
- Save the flow.
Use an Update Records Element to Update an Existing Contact
Now that the contact record variable contains the matching contact’s ID, you can reference that contact record variable in an Update Records element.
- After the Set Contact ID element, click
.
- Select Update Records.
- In the Update Records configuration panel, enter these values.
- For Label, enter
Update Contact.
- For API Name, enter
Update_Contact.
- For How to Find Records to Update and Set Their Values, make sure Use the IDs and all field values from a record or record collection is selected.
- For Record or Record Collection, select the contact record variable.
Because you selected the contact record variable, this element will update the record specified in the variable with every value stored in the variable. It’s a lot faster than selecting each field’s values one by one!
The Update Existing path should look like this.
- For Label, enter
- Save the flow.
Use a Create Records Element to Create a New Contact
Now it’s time to shift to the Not Found path. Remember, the flow runs this path when no duplicate contact is found, so it just needs to create the contact.
- On the Not Found path, click
.
- Select Create Records.
- In the Create Records configuration panel, enter these values.
- For Label, enter
Create Contact.
The API Name is automatically set toCreate_Contact.
- For How to set record field values, make sure From a Record Variable is selected.
- For How Many Records to Create, make sure One is selected.
- For Record, select the contact record variable.
Your flow canvas should look like this.
- For Label, enter
- Save the flow.
All of the flow’s data elements are done, but we’re not going to just leave things there without telling the user what happened. In the next unit, you create two more screens to help keep your users informed.