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!

Parents
  • 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  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

  • 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

  • Hi  

    I must say, this proves about 'in a few clicks' and, at the same time, this shows why it is important to have a configuring tool at the admin-stakeholders fingertips, rather than make a request for development - the requirements may change quite significantly (on the fly) and sometimes still may remain model (there are no ICC cameras of brand A, right?), so even if there is an exact flowchart that implements the last inquiry, the task will get more details prior solution really going production and therefore the flowchart will do need some adjustments which admin-stakeholder might deliver themselves having no PHP coding skills :)))

    Having said that, let me make some assumptions about the new requirements prior implementation:
    1. the custom field icc_project_camera was added to the out-of-the-box metadata not via Studio (cause no _c at the end of the name), perhaps, via vardef adjustment (this operation is a development for me) - so it extends the out-of-the-box table, not the custom table - that is important to know in terms of metadata
    2. assume that "field contains the value A" means that we are looking for the cases when one of the field's values that were chosen from the dropdown has item key = 'A' (not a label value A, cause, in general, there could be different labels per language)
    3. the key 'A' we are looking for is not case sensitive - so, in fact, we'd like to set tag  'A' to the new opps that got 'A' or 'a'  as an item key selected in icc_project_camera
    E.g. having at least one of these two values at icc_project_camera is the reason for tagging the corresponding Opp with tag 'A' (and not for Axis or Leica!):

    4. the tag A already exists as a record of module #Tags, so no need to take care about adding a brand new tag to the system in our flowchart prior to tagging the opp.


    Now, here is the flowchart:


    To read, follow the white line of logic flow:
    1. Triggering criteria (on Opp is after save – a logic hook)
    2 .Check if the Opp is a new record
    3. Get icc_project_camera  value and retrieve a collection of choosen dropdown keys from it
    4. Loop through the those keys - make each of them uppercase and compare with A (search both a and A - non case sensitive) 
    5. On match found, retrieve a Tag with Name ='A'  - it should exist here, and be the one!, and link the Opp to the Tag retrieved
    6. Break the loop since we found the value for tagging, no need to continue the search through the rest of items of icc_project_camera

    I could post here the zip file for that flowchart so that you could use it freely, but not sure if I hit expectations with my assumptions above - please let me know if interested in a zip and I will upload it here

    Alternatively, you may make it work according to your needs. 
    For that sign up to https://logicbuilder.integroscrm.com/ environment for a trial (it is free for 30 days), and I will be in a position to share the last flowchart with you so that you can ensure the logic relies on your instance custom metadata correctly and be in a position to make necessary adjustments yourself (I will guide you, if necessary) and get your logic hook zip for deployment

    For example, we might change the logic to deal with labels rather than dropdown keys of the Multiselect field

    In case the metadata that the flowchart uses matches your instance metadata, the zip file  will be operational on your instance.
    pls note- that zip is Sugar code, it does need neither licensing nor any kind of external access - once uploaded via Module Loader it needs just Sugar core to operate 

    I hope this read was not as long as the previous :)

    let me know if ready to get some practice in configuring logic hooks yourself

    All the best,
    Dmytro

    Best Regards,
    Dmytro Chupylka

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

Reply
  • Hi  

    I must say, this proves about 'in a few clicks' and, at the same time, this shows why it is important to have a configuring tool at the admin-stakeholders fingertips, rather than make a request for development - the requirements may change quite significantly (on the fly) and sometimes still may remain model (there are no ICC cameras of brand A, right?), so even if there is an exact flowchart that implements the last inquiry, the task will get more details prior solution really going production and therefore the flowchart will do need some adjustments which admin-stakeholder might deliver themselves having no PHP coding skills :)))

    Having said that, let me make some assumptions about the new requirements prior implementation:
    1. the custom field icc_project_camera was added to the out-of-the-box metadata not via Studio (cause no _c at the end of the name), perhaps, via vardef adjustment (this operation is a development for me) - so it extends the out-of-the-box table, not the custom table - that is important to know in terms of metadata
    2. assume that "field contains the value A" means that we are looking for the cases when one of the field's values that were chosen from the dropdown has item key = 'A' (not a label value A, cause, in general, there could be different labels per language)
    3. the key 'A' we are looking for is not case sensitive - so, in fact, we'd like to set tag  'A' to the new opps that got 'A' or 'a'  as an item key selected in icc_project_camera
    E.g. having at least one of these two values at icc_project_camera is the reason for tagging the corresponding Opp with tag 'A' (and not for Axis or Leica!):

    4. the tag A already exists as a record of module #Tags, so no need to take care about adding a brand new tag to the system in our flowchart prior to tagging the opp.


    Now, here is the flowchart:


    To read, follow the white line of logic flow:
    1. Triggering criteria (on Opp is after save – a logic hook)
    2 .Check if the Opp is a new record
    3. Get icc_project_camera  value and retrieve a collection of choosen dropdown keys from it
    4. Loop through the those keys - make each of them uppercase and compare with A (search both a and A - non case sensitive) 
    5. On match found, retrieve a Tag with Name ='A'  - it should exist here, and be the one!, and link the Opp to the Tag retrieved
    6. Break the loop since we found the value for tagging, no need to continue the search through the rest of items of icc_project_camera

    I could post here the zip file for that flowchart so that you could use it freely, but not sure if I hit expectations with my assumptions above - please let me know if interested in a zip and I will upload it here

    Alternatively, you may make it work according to your needs. 
    For that sign up to https://logicbuilder.integroscrm.com/ environment for a trial (it is free for 30 days), and I will be in a position to share the last flowchart with you so that you can ensure the logic relies on your instance custom metadata correctly and be in a position to make necessary adjustments yourself (I will guide you, if necessary) and get your logic hook zip for deployment

    For example, we might change the logic to deal with labels rather than dropdown keys of the Multiselect field

    In case the metadata that the flowchart uses matches your instance metadata, the zip file  will be operational on your instance.
    pls note- that zip is Sugar code, it does need neither licensing nor any kind of external access - once uploaded via Module Loader it needs just Sugar core to operate 

    I hope this read was not as long as the previous :)

    let me know if ready to get some practice in configuring logic hooks yourself

    All the best,
    Dmytro

    Best Regards,
    Dmytro Chupylka

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

Children
No Data