Re: Transform multiple workflow in one action

Ignace_Kervyn_d
Level 3

Transform multiple workflow in one action

Hello the commuity

I come back with a very specific question;

I would like to send a Sales alert

This signature corresponds to a name in a drop down list of a form

Unfortunately, I had to create the red frame schema in the workflow

If name X fields selected, take email A and send it to name x.

I had to do this operation for 60 fields..... My mouse died from clicking so much

I would like the diagram in the green box.

If name X fields selected, take email A and send it to name x.

Does someone can help me ?

Thanks

pastedImage_0.png

3 REPLIES 3
Jay_Jiang
Level 10

Re: Transform multiple workflow in one action

The easiest way, and I'm only suggesting this because it looks like it's an internal form, is to put the email addresses as the values in the drop down list. so you then use the token of the drop down field in your send alert additional emails

Ignace_Kervyn_d
Level 3

Re: Transform multiple workflow in one action

I'm sorry I haven't been clear.

In fact there is more explications;

When my commercial NAME X filled the intern form. Then he receveid a sales alert (EMAIL A) on his personnal mail adress (NAME X adress mail).

The text in the email doesn't change except his customer name's

This email A has to be send to differents address mail (different name X Y Z).

So Name X or Y or Z

pastedImage_1.png

So do I have to put the email adresses as the values in the drop dosn list ?

Jay_Jiang
Level 10

Re: Transform multiple workflow in one action

The suggestion above would make your drop down look like this:

pastedImage_0.png

Where you would use the field as a token to dynamically send the alert email.

But now it sounds like you want to manage a custom set of sales person fields... The way I've done this in the past is to create custom fields for first name, last name, email or any other field to save the sales person's details. the way to not have to deal with a whole lot of choices in a smart campaign is to use a webhook that manages the details of your sales people

your form will have unique ids of the sales people, could be numbers, concatenations of first and last name etc...

pastedImage_3.png

In your flow, call a webhook which saves the response before sending the alert.

pastedImage_4.png

Your webhook could be something like this in php, you'd manage your sales people data in the webhook file rather than smart campaigns:

<?php

$data = [

'1'=>['firstName'=>'James','lastName'=>'Adams','email'=>'James@domain.com.au'],

'7'=>['firstName'=>'John','lastName'=>'Doe','email'=>'John@domain.com.au'],

'18'=>['firstName'=>'Joe','lastName'=>'Blogs','email'=>'Joe@domain.com.au'],

'29'=>['firstName'=>'Steve','lastName'=>'O','email'=>'Steve@domain.com.au'],

'31'=>['firstName'=>'Jane','lastName'=>'Smith','email'=>'Jane@domain.com.au']

];

if(isset($_POST['salesid']) && !is_null($data[$_POST['salesid']])){

echo json_encode($data[$_POST['salesid']]);

} else {

http_response_code(404);

die("No user details found");

}

?>