Social Batch Flow

create a DigitalGenius Flow for receiving a batch of cases from Social25

When Social25 sends new messages to Flow, it sends a set of cases in batches. Therefore we need to have a flow that will take a batch of cases as an input and then kick off the individual case level flow for each case in the batch. Incoming cases data will also include a list of social posts on that case. Each post has fields such as whether it's an incoming messages or outgoing.

In order to create the batch flow, you can create it from scratch or copy an existing social batch flow if there is one already. Each Salesforce org needs to be connected to a separate batch flow.

Creating a Social Batch Flow from scratch

Create a new flow as per steps here: Creating Flow, give it a name such as Batch Social Flow Prod or Batch Social Flow UAT depending on the org you will be connecting it to.

3324

Create a New Flow

Next add a Flow Input called Cases with the following details:
id: cases
type: List

🚧

Cases Input ID

It's important that the id of the Cases input is exactly cases. Otherwise the data sent from Social25 will not be connected to the flow correctly.

3322

Add Cases input.

Add DG API Key and DG API Secret Flow Configurations. Keep the String type for both. To get the API Key and Secret values follow the steps here: API Key/Secret.

3320

Add a Configuration for Flow ID. Keep the String type. For now just put some placeholder value. We will update it this later with the ID of the case level flow to be run.

3320

Search for the Batch Conversational action and add it to the Flow.

800

Populate the inputs of the Batch Conversational Action as follows:

Cases: Flow Inputs > Cases
Region: Constant Value > EU or US depending on which region you are in.
DG API Key: Flow Configurations > DG API KEY
DG API Secret: Flow Configurations > DG API SECRET
Flow / Action ID: Flow Configurations > FLOW ID

Save.

800

Copying an Existing Social Batch Flow

If you already have an existing Social Batch Flow, then it is quicker to copy one and change some configurations rather than creating one from scratch.

Open the batch flow you want to copy and click on the Duplicate button. This will create a copy of the flow. Rename the copy to avoid confusion.

800

In the newly created flow update the FLOW ID configuration so it does not trigger the same case level flow as the original batch flow. You can update it to the ID of the case level flow you created for this salesforce org or put a placeholder (for example, 111) if no case level flow was created yet.

🚧

Update the FLOW ID configuration when copying the flow

It's important to update the FLOW ID configuration, otherwise you might have a batch flow from one org triggering a case level flow connected to another org.