Skip to main content
Tempo stimato
Argomenti
Chiedi alla community

Prepare Your Org

What You’ll Learn

This flow project introduces you to the Assignment, Decision, Get Records, and Update Records elements. In it, you’ll learn how to:

  • Perform conditional branching with more than two branches.
  • Pass data from a record into a flow by using URL parameters.

Get Your Org Ready

Sales reps cite Acme Wireless’s aggressive discount program as a key factor in closing deals. Unfortunately, getting permission to offer that discount is cumbersome. Reps must email management, wait for a reply, and then pass the information back to the customer. The process is slow, and it lets Acme’s more nimble competitors land clients being courted by Acme. Streamlining this process is a top priority, and you’ve been called in to assist.

In this project, you create a flow that automatically determines how much of a discount to offer a customer. Here’s how it’ll work when you’re done.

A sales rep gets to the point in her deal where she needs to quote a price to her client. She goes to the opportunity record and clicks a button: Calculate Discount. Bam! The discount is calculated and the opportunity is instantly updated. Thanks to some simple math in the flow, the rep doesn’t have to wait for management to approve the discount. She can get back to her job: closing deals fast.

Notice that the sales rep doesn’t have to do anything other than click a button. That’s because this flow works in the background. Flows that don’t require user interaction are called autolaunched flows.

This project requires your Trailhead Playground to have two custom fields on the Opportunity object. Discount Percentage stores the opportunity’s discount and Discounted Amount calculates and stores the final opportunity amount after the discount has been applied.

  1. From Setup, enter Object Manager in the Quick Find box, then select Opportunity.
  2. Select Fields & Relationships and click New.
  3. For Data Type, select Percent and then click Next.
  4. Enter these values.
    • For Field Label, enter Discount Percentage.
    • For Length, enter 18.
    • For Decimal Places, enter 0.
    • For Description, enter Displays the percentage to be subtracted from the total amount of the opportunity.
    • For Help Text, enter If the customer is getting a discount on this opportunity, enter the amount here. For example, if the discount is 10%, enter the whole number 10.
  5. Click Next twice, then Save & New.
    If the New Custom Field page doesn’t appear, refresh the page.
  6. For Data Type, select Formula and then click Next.
  7. Enter these values.
    • For Field Label, enter Discounted Amount.
    • For Field Name, enter Discounted_Amount.
    • For Formula Return Type, select Currency.
    • For Decimal Places, enter 2.
  8. Click Next.
  9. Enter these values.
    • For Discounted Amount (Currency), enter Amount * (1 - Discount_Percentage__c)
    • For Description, enter Calculates the opportunity amount after any discount has been applied.
    • For Help Text, enter Opportunity amount after discount has been applied.
  10. Click Next twice, then Save.
Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback