function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ed_IngberEd_Ingber 

How to send an email, create a task, send outbound message?

Conventional "Workflow Rules" can execute actions when a record matches the criteria. How can you execute similar actions using Visual Workflows - specifically,

  • send an email alert,
  • create a task,
  • send an outbound message (SOAP call)

Browsed through the entire board but didn't see any examples - presumably these things would be done with Apex plugins.

 

Thanks!

Ed 

Best Answer chosen by Admin (Salesforce Developers) 
RajaramRajaram

You can do those actions in Visual Workflow, however they may be harder to do it natively.

1. Tasks: These should be the simplest as a task just any record. Select the Task or the Event object when creating the record create element in flow

2. Email Alerts: You will beed an apex plug-in for this. I will be releasing a sample plug-in for this soon. However, you can create it yourself as the Apex plug-in is nothing but a wrapper for the SendEmail Apex API 

3. Outbound message: Again, this is feasible, but you need to create an Apex Plug-in for this.

 

Hope this helps.

 

Raja

All Answers

RajaramRajaram

Workflow rules are independent of Visual Workflow. Traditional workflow rules are tied to a record transaction. So if you have a rule already in place, it will be triggered if the record is created through the record create element in visual workflow.

 

Ed_IngberEd_Ingber

Okay, understood that Visual Workflow and Workflow Rules are independent. But in thinking about this, and without any examples of better approaches, it looks like I need to have Visual Workflow update a record's field, which can trigger a Workflow Rule (I'll need to create this) to send an email, create a task, or send an outbound message.

 

Is that right?

 

Thanks!

Ed

RajaramRajaram

You can do those actions in Visual Workflow, however they may be harder to do it natively.

1. Tasks: These should be the simplest as a task just any record. Select the Task or the Event object when creating the record create element in flow

2. Email Alerts: You will beed an apex plug-in for this. I will be releasing a sample plug-in for this soon. However, you can create it yourself as the Apex plug-in is nothing but a wrapper for the SendEmail Apex API 

3. Outbound message: Again, this is feasible, but you need to create an Apex Plug-in for this.

 

Hope this helps.

 

Raja

This was selected as the best answer
Ed_IngberEd_Ingber

Yes it helps, thanks. I'll create them indirectly through Workflow Rules for now.

 

Regards,
Ed

RajaramRajaram

It is probably easiest for those inddividual things. If you want those actions to be triggered only from a flow, create a custom field which you can use in the filter criteria for the workflow rule, so that they dont fire any other time.