Trigger - on new sale where condition send email notification

I am trying to get a better handle on triggers in general. Specific case is 'when sale is new' and probability equal/more than x%, send email notification w. link.

This is what I have so far (note: using 8.4 Build Release84_C-2019.03.15-01, fixing issues with embedding variables in reply temlate):

1. condition on After saving sale (as new): 

 

Send email: 

using reply template:

 

 

result: 

 

So, email body is blank. In addition, notification is sent on any changes to the sale (condition of 'new') fails.

Also, how is link to sale embedded ?

 

thank you

 

 

 

 

 

RE: Trigger - on new sale where condition send email notification

Hi Eirik,

The IF-tests are executed individually. So, the first task (loading template) is only done when a sale is new. However, the second task (send email) is done every time. Solution: Change the IF- on the second task to "If previous IF-test was true".

Sverre

By: Sverre Hjelm 18 Mar 2019

RE: Trigger - on new sale where condition send email notification

Thanks Sverre. The second IF did the trick in re. to only a new sale causing the notification to go out.

Any suggestions as to the lack of detail (company) name not being displayed in the message (+ optionally, if/how a link to the sale can be done) 

 

rgds

By: Eirik Simonsen 18 Mar 2019

RE: Trigger - on new sale where condition send email notification

Hi Eirik,

In the first task, where you load the reply template, have you also specified that you should load merge fields for a company, and pass the company ID from the sale? Your screenshot is cutting of just above that parameters, so I cannot see.

Sverre

By: Sverre Hjelm 22 Mar 2019

RE: Trigger - on new sale where condition send email notification

Sverre.. thanks, and apologize for delay. (also, below from 8.4 Build Release84_C-2019.04.09-01)

See the setting below: 'Company' set from Real time values from trigger'.

The mail notification does not include company name from the reply template, so I must be missing something.

 

By: Eirik Simonsen 15 Apr 2019

RE: Trigger - on new sale where condition send email notification

With 8.5, fixes the reply template and trigger now carries over with company name (as well as parser variables) in the body of the email.

This allows for Company name (and adress used as example) and our contact to be carried over.

I would like, if at all possible to include a link back to a company view in SO for easy navigation (even better the sale under the company.... along the lines of:

 

attempting encapsulation using either CRM or CS values (cuid) using { or < etc have been unsucessful.

Also, the subject header does not seem to allow any sort of variables.  Am I missing something ?

the ideal situation would be:

Header: a new sale of (currenc) amount x for company Y has been created/updated

Body:

Company name

Sales owner 

Link to the sales page.....

 

 

 

 

 

 

 

 

 

 

 

 

 

By: Eirik Simonsen 21 May 2019

RE: Trigger - on new sale where condition send email notification

Hello,

Believe you can input parser variable [[company.id]] in your link to achieve navigating to company view. 
On a general note remember that you are in the context of Service parser, so use "[[]]" around your variables and not "<>" or "{}".

Currently I dont believe that Sale entity values are supported in Service parser so adding "(Currency/Amount)" would not give any results. 
Subject: A new sale for company [[company.name]] has been created/updated, should provide results.

/Michel

By: Michel Krohn-Dale 22 May 2019

RE: Trigger - on new sale where condition send email notification

FYI: We have just submitted support for loading a sale entity into the "Load reply template and merge" task as well. It will be part of 8.5R03. With this, you can easily create a Macro which sends an email containing details from the sale, such as title, description, amount, currency, etc.

Sverre

By: Sverre Hjelm 22 May 2019

RE: Trigger - on new sale where condition send email notification

Michel

Thank you !... a link to company page in SO is working based on your good feedback.

on another note, the subject line 'Sales Opportunity for [[company.name]] for Review' inserts the value of the sale (and nothing else) in the email itself. I will test further and contact you directly for your take on this if found to be consistent.

Great to hear about the planned changes to include values from the sale itself.

\Eirik

 

 

 

 

By: Eirik Simonsen 22 May 2019

RE: Trigger - on new sale where condition send email notification

For me it was parsing company.name correctly,

Might be that my Macro is setup differently;

1. Load reply template for merging

2. Send e-mail or SMS

 

/Michel

By: Michel Krohn-Dale 29 May 2019