Acceptance, rejection as a link in the email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Enju
    Senior Member
    • Apr 2018
    • 134

    #1

    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
  • rabii
    Active Community Member
    • Jun 2016
    • 1301

    #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
    Here to help :)

    Comment

    • Enju
      Senior Member
      • Apr 2018
      • 134

      #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:	242
Size:	35.3 KB
ID:	97674

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1301

        #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
        Here to help :)

        Comment

        • Enju
          Senior Member
          • Apr 2018
          • 134

          #5
          Thank you rabii now it works!

          Comment


          • rabii
            rabii commented
            Editing a comment
            you are welcome
        • i-Arbeitsschutz
          Junior Member
          • Sep 2023
          • 24

          #6
          Hi rabii ,

          luckily I found this post - it helped me a lot
          However, I have a question and hope you can help me:


          I've got 4 tracking URL's with action "show message". I also generate 4 unique ID's which is all according the example above included in an email template.

          Once the receipient receives the message, he has 4 options he can choose from.
          For example he chooses "accept" , he will be shown the message "Thank you, the chosen date was accepted" (or something else) in his browser and internally the flowchart in EspoCRM goes on and ends the process at some point.

          Nevertheless he could still click the other links in the email (e.g. "decline", "call me", "never contact me again ") and will always be shown it's own messages, even though it has no effect on the first (in CRM registered) choice.

          Here my question: After his choice was registered in CRM, is there a way to delete the remaining unique ID's (not the tracking URL's) or possibly a chance that he will be shown an message like "Sorry, but this link is no longer valid" if he's clicking the links in his email ??

          Your help is very much appreciated !

          Kind regards, Martin

          Comment

          Working...