Save the Microphone recording file as an attached on a record

Overview

This tutorial teaches you how to automatically save and attach microphone recordings made with the Avonni Microphone component directly to a record within a Salesforce screen flow.

So, let's get started!

Final Outcome

Steps

1. Create an input variable

Create an input variable: Input variables are essential in this process because they serve as a way to store information passed between different screens in the flow. We create an input variable in this particular flow to store the relevant record information.

This allows us to:

  • Link the recording to the correct record: By storing the record data in the input variable, we ensure that the microphone recording is accurately attached to its intended target within Salesforce.

  • Maintain context throughout the flow: The input variable lets different screens within the flow access and use the record information as needed, making the process more seamless.

Steps to create an input variable

  • Create a new Screen Flow

  • Click on the "New Resource" button

  • Resource type => Variable

  • API name => RecordID (or your API Name)

  • Data Type => Text

  • Check "Available for input"

2. Add a screen component and the Input Pen

  • Add a Screen element

  • Enter an API name

  • Hide Header and Footer (if needed)

  • Drag the Avonni Microphone component

  • Click the "Open Component Builder" button to access all the Microphone component's settings.

3. Configure the Avonni Microphone component to save recordings

You have accessed the component builder at this stage, which is crucial in setting up the Avonni Microphone component.

Here's how you can proceed to enable the saved recording as a content document:

  • Toggle the "Save as content document" setting.

  • Optional - toggle the "Auto Save Content Document" to let the Avonni Microphone automatically save the recording as a file on the page where this flow is added.

  • Enter a document title used as a document name when the recording is saved on Salesforce.

  • Mapped the variable created in Step 1 to ensure recording files are saved as content documents directly on the record page where the screen flow (containing the Avonni Microphone component) is used.

4. Add your flow to your Salesforce

Once your flow is created, you can add it directly on Salesforce. For example, we will add it to the opportunity record page using App Builder.

Remember to pass your current RecordID in your screen flow when adding your flow to a page using Lightning App Builder.

Last updated