Avochato Broadcasts from Salesforce Campaigns
A how-to on creating SFDC Campaigns to send mass messages via Avochato Broadasts
Overview
Salesforce Campaigns can be leveraged to send Avochato broadcasts to the campaign members of that campaign.
How does it work?
We have two Flow actions that work together to send the Avochato broadcast to those Campaign members.
- Avochato - Create Broadcast: this action preps the broadcast in Avochato with all the campaign members phone numbers. Note that prepping a broadcast can take anywhere between several seconds to several minutes depending on the audience size.
- This action will save the Avochato Broadcast ID within the Campaign Description (
Campaign.Description
). - If the
asap
attribute is set to true, we’ll send the broadcast as soon as it’s ready (and you can skip the “Avochato - Publish Broadcast” action below!)
- Avochato - Publish Broadcast: this action will actually publish the broadcast, which can be done either immediately, or scheduled to be sent at a later date. Use the Avochato Broadcast ID that was saved to the Campaign Description field to specify the broadcast that you want to publish.
How to create
Flow builder actions can be used however you’d like within the Flow automation framework, but here’s an end-to-end example of how to use a Campaign and record-based flow triggers to send a broadcast.
Backend adjustments
1. Create a custom picklist field on Campaign called “Broadcast Status”, with two values:
- Create Now
- Publish Now
2. Create a Record-Triggered Flow on Campaign
Have the trigger run anytime the Avochato Broadcast Status changes. Optimize for “Actions and Related Records”, and mark the checkbox below it to include a Run Asynchronously path for our Avochato actions (which use the Avochato API)
Create a Decision element based on the Avochato Broadcast Status
Within the Create Now branch, insert the Avochato - Create Broadcast action with the following parameters:
- message: Whatever message you want to send to your audience. Note you can use Avochato based merge fields, like
$first_name
,$template_welcome_msg
,$survey_favorite_ice_cream
, etc.
- name: The name given to the broadcast. You can use the Campaign Name or whatever you’d like
- Salesforce Campaign Id: The Id of the Salesforce Campaign, namely, the current campaign’s Id.
Within the Publish Now branch, insert the Avochato - Publish Broadcast action with the following parameters:
- Broadcast Id: This Avochato Broadcast Id should have been saved to the Case Description field, so you can grab the Id from that field
- ASAP: set to true, which will send the broadcast to the audience right away.
Save the flow, then click Activate to make it live:
Run the broadcast
To run the broadcast from a Salesforce Campaign record, try the following:
- Go into the Salesforce Campaign that you’d like to broadcast to
- Change the Avochato Broadcast Status to “Create Now” and Save.
- That will send and start prepping the Avochato Broadcast
- When that is completed, the Campaign → Description field should save the Broadcast ID
- Now change the Avochato Broadcast Status to “Publish Now” and Save.
- And we’re off! The broadcast is now sending the message to all the recipients!
This is just a sample of what a workflow could look like to send a broadcast from a SF Campaign, and you can customize any of these steps to fit your use case.