Announcement

Collapse
No announcement yet.

Acceptance, rejection as a link in the email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Acceptance, rejection as a link in the email

    Hello,
    Is it possible to implement a scenario using BPM in which, after creating Opportunity, an e-mail is sent to the assigned person with an acceptance and rejection link? After clicking in mail, the status of the Sales Opportunity changes.
    I will be grateful for any tips

  • #2
    hey Enju

    It is possible, i have implemented such design before. see this in the documentation it explains how you can do it https://docs.espocrm.com/administrat...tracking-urls/

    If you still need help let me know

    Thanks
    Rabii
    Web Dev

    Comment


    • #3
      Thank you rabii for informations.

      I'm doing something wrong. I can't find where.

      1. I created a Tracking Url​: {trackingUrl:642bfeb1c43995d6a}
      2. I created Signal Intermediate Event (Catching) clickUrl.Opportunity.{$id}.642bfeb1c43995d6a
      3. ​I receives an email with a link, but after clicking on it, BPM does not go further


      Click image for larger version

Name:	obraz.png
Views:	155
Size:	35.3 KB
ID:	97674

      Comment


      • #4
        Look you need to use Unique URL as stated here https://docs.espocrm.com/administrat...ls/#unique-url

        1- First you need to create two url under campaign > Tracking Urls (create two tracking urls: accept / reject) e.g (accept
        {trackingUrl:650ad9db33f3e8a62}​) and ( reject {trackingUrl:650ad9ff0e113c5e5} )


        2- Then go to the template that you use to send email and insert the tracking url into the link url (href) like this => accept link {trackingUrl:650ad9db33f3e8a62.{$$accept}} and reject
        link {trackingUrl:650ad9ff0e113c5e5.{$$reject}}

        here is what the email template should look like:

        PHP Code:
        <p>Hi {Person.name},</p>
        <
        p>Here is a new opportunity generatedplease use the two links below to accept or reject it:</p>
        <
        p><a href="{trackingUrl:650ad9db33f3e8a62.{$$accept}}" target="_blank">Accept</a>&nbsp;&nbsp;<a href="{trackingUrl:650ad9ff0e113c5e5.{$$reject}}" target="_blank">Reject</a><br /></p>
        <
        p>Thanks you.&nbsp;</p

        3- see flowchart attached. the first script task (you need to generate an id for accept and reject variables as below)

        PHP Code:
        $accept util\generateId();
        $reject util\generateId();​ 

        4- in the Signal Intermediate Event (Catching) for both accept and reject you need to do as below

        For accept in signal paste in clickUniqueUrl.{$$accept}​
        For reject in signal paste in clickUniqueUrl.{$$reject}


        That should work, unfortunately i can't upload excel file here otherwise i could send you a csv for the flowchat and you can just change the template etc.
        Attached Files
        Last edited by rabii; 09-21-2023, 09:47 AM.
        Rabii
        Web Dev

        Comment


        • #5
          Thank you rabii now it works!

          Comment


          • rabii
            rabii commented
            Editing a comment
            you are welcome
        Working...
        X