For the complete documentation index, see llms.txt. This page is also available as Markdown.

Automatic Sync Captures to Newly Created Child Records using Flow (Admin-Oriented)

Overview

If a SharinPix Form has sections or repeated sections configured to generate new Salesforce records upon submission, Salesforce Admins can configure a Salesforce Flow to sync images captured in those sections to the SharinPix Albums of the newly created records.

This documentation explains how to configure your Flow accordingly. It covers the following :

  1. Flow Configuration Guide

  1. Demo of the flow

Flow Configuration Guide

The following flow setup uses a Record-Triggered Flow to automatically sync media captured to its related record's album when a form response is submitted.

Step 1: Configure a Record-Triggered Flow

  1. Go to Setup > Flows > Click New Flow

  2. Choose Start From Scratch and click Next

  3. Choose Record-Triggered Flow and click Create

  4. Set the following values:

Setting
Value

Object

Sharinpix Form Response

Trigger

A record is created or updated

Set Entry Conditions

All Conditions Are Met (AND)

Set Entry Conditions configuration:

Field
Operator
Value

ProcessedAt

Is Null

False

Image Synced At

Is Null

False

Records Created At

Is Null

False

Setting
Value

When to run the flow for updated records

Only when a record is updated to meet the condition requirements.

Optimize the Flow for

Actions and Related Records

Step 2: Add a Get Records to retrieve Form Sections with the created records.

Set the following values:

Setting
Value

Object

SharinPix Form Answer

Filter SharinPix Form Answer Records

All conditions are met (AND)

(see table below for condition requirements configurations)

Sort Order

Not Sorted

How many records to store

All records

How to store record data

Automatically store all fields

Condition Requirements:

Field
Operator
Value

SharinPix Form Response

Equals

Triggering sharinpix__FormResponse__c > Record ID

Linked RecordId

Is Null

False

Step 3: Add a Loop to go through each section

Setting
Value

Collection variable

Get Records > SharinPix Form Answers from Get Sections With A Created Record (Step 2)

Specify direction for iterating over collection

First item to last item

Step 4: Add a Get Records to capture answers in the sections

Set the following values:

Setting
Value

Object

SharinPix Form Answer

Filter SharinPix Form Answer Records

See table below for condition requirements configurations

Sort Order

Not Sorted

How many records to store

All records

How to store record data

Automatically store all fields

Condition Requirements:

Setting
Value

Condition Requirements

Custom condition logic is met

Conditional Logic

(1 OR 2) AND 3 AND 4

Condition logic:

Field
Operator
Value
1

SharinPix Form Section

Equals

Current item from loop for each section with a created record > Record Id

2

Form Repeated Answer

Equals

Current item from loop for each section with a created record > Record Id

3

InputType

Equals

sharinpix-app

4

Image URL

Is Null

False

Step 5: Add a Loop to go through every answer in the section

Setting
Value

Collection Variable

SharinPix Form Answers from Get Capture Answers in Section (Step 4)

Specify direction for iterating over collection

First item to last item

Step 6: Add Apex Action SharinPix Duplicate Album

Add the Apex action sharinpix__DuplicateAlbum to the flow. For more information regarding this Apex action, refer to this documentationDuplicate a SharinPix album using a Flow (Admin-Oriented).

Setting
Value

Destination Album ID

Current Item from Loop For Each Section With A Created Record (Step 3) > Linked RecordId

Source Album ID

Current Item from Loop For Each Capture Answer In Section (Step 5) > Record ID

Include Tags

True or False

The final Flow should look like this:

Demo

In this demo, the SharinPix Form is configured with a repeating section 'On-Site Workers' that creates new contact records. Any images uploaded via the embedded capture element in those sections will automatically be duplicated to the albums of the newly created contacts.

Upon Form submission, the Flow automatically triggers and duplicates any images uploaded in the section directly to the related contact record's album.

Last updated

Was this helpful?