How to add tags using SugarBPM

I'm trying to set up a SugarBPM process that will add a specific tag to a Task when the Related-To field is set to given values. I'm guessing that I need to use an Action that changes a field, but the list of fields in the Change Fields action does not include Tags. Is there any way to access Tags in SugarBPM?

If it can't be done in SugarBPM, I'll have to set up a logic hook to do this. This is not a bid deal, but SugarBPM is much preferred.

Thank you for any help!

  • I'd configure logic hook for that in the Logic Builder for Sugar tool with a few clicks, then call configured in SugarBPM on any step of the process, wherever need it

    Best, 

    Dmytrio

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Hello   

    Have you found a solution yet? We have the same challenge to solve.

    Best,
    Steffen

  • Hello  could you please explain the "few clicks" in more detail. I myself have not implemented any logic hooks in Sugar yet and am wondering if I should try it on this use case. That would be very helpful and much appreciated.

    Best,

    Steffen

  • hi  

    The question is asked in the development chapter, while I got used to configuring Sugar nocode for years because I'm unfamiliar with PHP on the level of a coder.
    If you are too a non-developer who evaluates the delivery of better automation as a CRM admin, setting up logic hooks as I do—with Logic Builder—can be worth trying.

    so, do you want me to explain a "few clicks" on Yuri's example?
    also, if ready to specify the details of your case, then I may try to show how I would solve your challenge with no code, because it might take the same number of clicks as showing configuring Yuri's case

    WBR,
    Dmytro

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Hi  

    I would very much like to find out if I can create my own automations using the Logic Builder. Our use case is as follows:

    We want to tag certain opportunities. For new opportunities, the system should check if a custom field "camera" has a specific content and if so, a specific tag should be assigned in an action. Unfortunately, the associated field "Tags" is not displayed in the action "Change Field" and cannot be selected. 

    I created a BPM workflow that enters a value in the Description field, but it can't write a tag. 

    How would you implement this?

    Best,
    Steffen


  • Hi  

    Okay, then let me show logic hooks configurations options to implement your inquiry - that will be quite a text of explanation rather than a few clicks of implementation, sorry for the long read Blush

    First, pls note, based on the req provided, I see options on how to express the mapping of content->tag for proper tagging of new opps based on camera field data, so I might have 3 options of implementation for you  - they are about different ways of content->tag dictionary implementation, also each of the approaches has its pros and cons.

    I will start from the simplest approach -  which is a few clicks if know how to deal with elements of the Logic Builder interface - and then I will move toward the generic solution, which is more interesting in terms of applicability

    Option 1-SearchExplicitContent
    Describe the context to search explicitly in the logic and then make tagging

    To read the picture, follow the white line of logic flow  (zoom in the pic if necessary)

    1.Triggering criteria (on Opp is after save – a logic hook)
    2.Check if the Opp is new record
    3.Get camera field value and try to substitute the value with content, if the result differs from the initial value, then the content is in the value – that is our case for tagging new opp with "Beginner" tag
    4.Operation of tagging of the Opp is actually relating of the Tags module record with Name=Beginner (search of that record is represented as Retrieve Entities by Attributes) to the Opp record (implemented with Link Entities on the drawing)

    The Pros of the option is the simplicity of implementing/reading this, the huge Con is that this approach requires explicitly draw here each of the content->tag mapping, also it requires Tag record to be represented in Sugar – this logic does not add the brand new tag to the tags list automatically.

     

    Option 2- 2-SearchInTagsDesc

    In fact, Tags records have fields Name and Description, so the idea is to use Tag’s Description to describe the content to search in camera value, and if the one is found then relate Opp to that very Tag Name.
    Like this:  

     

    So, here is the implementation:

    To read the picture, follow the white line of logic flow (zoomin the pic in necessary)

    1. Triggering criteria (on Opp is after save – a logic hook)
    2. Check if the Opp is new record
    3. Retrieve all the records of Tags module (non-deleted means all)
    4. For each of the Tag record - retrieve the Tag’s Description and try to find it in camera field value and substitute with whateverText. In case of success the new text will differ from the original camera field value (a not equal to b in drawing) – that is how we implemented search of the content in a camera field.
    5. On success do link the Tag record to the Opp record, that is Tagging operation

    The Pros of this approach is that we may define content in Tags records Descriptions via Sugar interface and that will feed the  logic hook implementation with necessary data to work. Cons are that implementation  retrieves the whole list of Tags record for  processing which is not good if there are very many Tags in the system, also we have to repeat the content for a number of separate Tag records if there is a possibility to get an Opp taggeg with two or more tags according to your business model

    Option 3-SearchViaMappingNotes

    Again, its all about where to set the content->tag mapping.
    Usually in I setup a new custom module for mapping in Studio, and call it somelike a Dictionary.  But I wouldn’t mess with custom modules for this example, so let me to a trick – I will use some of OOTB  Notes records for a dictionary.
    Specifically, I will define that Notes with Sublect=”::TAG MAPPING NOTE::” will be my utility notes, and I will use a Note’s Description to specify the content to search in the camera field. Also, I will tag the utility Notes records with specifically those Tags that I’d like the system to set to the Opps.
    The Notes will look like these:

    Now, here is the implementation:

    To read the picture, follow the white line of logic flow (zoom in the pic if necessary)
    I may assume, this could be quite uneasy to read for the first time, but in a few times, it will be easy as a pie

    1. Triggering criteria (on Opp is after save – a logic hook)
    2. Check if the Opp is a new record
    3. Retrieve all the utility Notes using subject value as a criterion for the retrieval
    4. For each of those Notes check if the content (set as Note’s Description) in found in a camera filed (the same way like in previous implementation options) and in case of success, to retrieve all the Tags related to the Note and link the Opp to those Tags

    The Pros of this approach is that you have a dictionary for content->tag  in Sugar Notes records, so can easily add new mapping items via Sugar interface, also if the content found should lead to tagging opp with two tags, then no need to have two dictionary records – just one Note with two tags (see example Notes for e.g. Cannon EOS R10 on the picture above)

    The Cons is that implementation takes fairly more than just a few clicks, however still no need to learn PHP

    Now, what happens with the drawings?

    With a click, I get a zip file generated by Logic Builder based on a drawing – that zip is a logic hook implementation.
    I use Module Loader to deploy the logic hook to the instance:

    As you can see, Option 3 is deployed to the instance, you may try the logic hook behavior by creating a new Opp with content e.g. “Canon EOS R10” in the camera field on that instance.

    To try out options 1 and 2, you may uninstall zip of the current option and install another one option

    Here is the link to that instance:

    https://sg-generic1.demo.sugarcrm.eu/
    login:admin
    password: GenericGeneric.1

    I can send over zips to you -  in case your custom field camera was added via Studio (camera_c), the solution should just work for your Sugar instance metadata

    If you need more info about Logic Builder, you can search it in the SugarClub posts and also here https://integroscrm.com/logic-builder/ , for more information pls write or call me

    In addition, answering Yury’s question: similar logic hook configuration could be just one Action in the complex workflow definition in SugarBPM

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Hi  ,

    Our Upsert BPM Essentials plugin has a collection of custom BPM actions to increase the versatility of what you can accomplish in SugarBPM. We do not currently have an action to add/replace tags on a record, but it is something we are confident we can implement. If our next feature release of the plugin contained this action, would that product subscription be of interest?

    Chris

  • Hi  ,

    It would be great to be able to tag Sugar records with Sugar BPM.  Your BPM Essentials plugin already has some interesting enhancements that will certainly be helpful. However, apart from the tagging capabilities, I don't have any use cases at the moment, so I'd rather try to implement the requirements once. But I'll definitely keep an eye on BPM Essentials.

    Thanks

    Steffen

  • Hello  

    Thank you very much! This is indeed a long read. But very interesting and informative!

    Option 1 covers our use case - we have a MultiSelect custom field in the opportunities (‘icc_project_camera’ and only if this contains the value ‘A’ should the existing tag ‘A’ be set. There is only this one case.

    Thanks

    Steffen