Skip to main content

Estimación de tiempo

Confirm Whether to Update the Contact

If the flow finds a matching contact, the user can update that matching contact. But the user may not want to do that. Sometimes users enter data incorrectly, after all. So let’s create a screen that asks the user how they want to proceed.

Add a Screen to Confirm How to Proceed

First, add a screen element to the Found path.

  1. On the Found path after the Match Found? element, click Add Element.
  2. Select Screen.
  3. For Label, enter Update or Leave.
    The API Name is automatically set to Update_or_Leave.

Add a Display Text Component to the Screen

Next, add a component that tells the user what the existing contact’s values are, and compares those values to the values they entered on the previous screen.

  1. In the Components tab, enter display in the Search components box.
  2. Click the Display Text component to add it to the screen canvas.
  3. In the Display Text component’s properties pane, for API Name, enter duplicateInfo.
  4. In the text editor, enter the following text.
We found an existing contact that already has that email address. Do you want to update the existing contact?
Existing Name: {!Find_a_Match.FirstName} {!Find_a_Match.LastName}
New Name: {!contact.FirstName} {!contact.LastName}
Existing Account: {!Find_a_Match.Account.Name}
New Account:{!contact.Account.Name}

The Display Text configuration panel corresponding to the preceding steps.

This text informs the user about the duplicate contact and asks them if they want to update it. The following lines reference an existing value or a user-entered value, presenting those values to the user. Note that you can also add these references by selecting them in the “Insert a resource” field.

  1. Click Done.
  2. Save the flow.

Add a Toggle Component to the Screen

Now let’s add the toggle for the user to specify if the flow should update the existing contact.

  1. On the canvas, click the Update or Leave element to open its screen canvas.
  2. In the Components tab, click Toggle to add that component just below the Display Text component.
  3. In the Toggle component’s properties pane, enter these values.
    • For API Name, enter update_toggle.
    • For Label, enter Click to Update.
    • For Active Label, enter Update existing contact.
    • For Inactive Label, enter Leave existing contact unchanged.
      The Toggle component corresponding to the preceding steps.
  4. Click Done.
  5. Save the flow.

Add a Decision Element to the Flow

The Found path needs its own split: one path to update the existing contact, and another path to leave the existing record unchanged. The path the flow takes depends on the user’s choice. Add a Decision element to create these two paths.

  1. After the Update or Leave element, click Add Element.
  2. Select Decision.
  3. In the New Decision window, for Label, enter What Did User Choose.
    The API Name is automatically set to What_Did_User_Choose.
  4. In the Outcomes section, make sure that New Outcome is selected.
  5. In the Outcome Details section, for Label, enter Update Existing.
    The API Name is automatically set to Update_Existing.
  6. For Condition Requirements to Execute Outcome, select All Conditions Are Met (AND).
  7. Enter this condition.
    • For Resource, select Update or Leave > Click to Update > value.
    • For Operator, select Equals.
    • For Value, select True.
  8. In the Outcome Order section, select Default Outcome.
  9. For Outcome Label, enter Do Nothing.
  10. Save the flow.

The Flow Builder canvas corresponding to the preceding steps.

Now your flow ends in three paths, and two of those paths need to do something with your data. In the next unit, you build the elements that make things happen.

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios