SMAX Mandatory field Service Portal/SM

Hello,

I hope you all are doing good,

I need help, I want to make a field mandatory during the creation of a request from the agent interface but not mandatory from the Service Portal,

I added a rule to make the field mandatory on the business rules but It seems like it's applied to the end users from Service Portal too,

Any suggestions please,

Thank you in advance,

Kind regards.

  • 0  

    Hi

    You can put a condition to the rule so that rule is executed only when user is using one or the other interface. To check if user is using service portal use following condition

    ${current_flow.IsPortalFlow}

    Dusko

  • 0 in reply to   

    Hello Dusko,

    Thank you for your reply,

    I tried the condition you provided as shown below : 

    IF
    ${current_flow.IsPortalFlow == false}
    Set Category as mandatory

    My intention with this rule is to have the Category field mandatory for the agents that create the request from the request agent interface but not for the end users that create their requests from the Service Portal

    After applying this rule when I tried to create a request from the portal I got an error saying : Sorry your request couldn't be submitted
    After removing the rule again I created a request successfully so it doesn't seem to be working or am I doing it wrong,

    Any idea please?

    Thank you in advance,

    Kind regards.

  • 0   in reply to 

    Hi Youssef,

    I tested the condition, and it works. Try to run your session with debugger. Maybe it will give you some hints what is causing the problem that you are facing.

    Regards,

    Dusko

  • 0   in reply to 

    Mybe you should add additional condition like

    ${current_flow.IsPortalFlow == false && entity.Id == null}

    so that this condition is valid only for the creation of the request. Once request is created, the field is not mandatory anymore.

  • 0   in reply to   

    As documented, this object is not available for general use

    https://docs.microfocus.com/doc/ESM/SaaS/ObjectPropertyExp

    There are specific scenarios where it might work for rendering, but the "after change" is problematic, as the majority of end-user initiated flows then automatically trigger agent side flows, due to various business rules and task plans.

  • 0 in reply to   

    Hello Dusko and Brindusa,

    Thank you so much for your support,

    I added the same rule Dusko provided and saved, the field is mandatory from the agent interface but not mandatory from Service Portal (which what I was looking for) but I get the same error message when I click submit (from Service Portal) : 

    An error occurred while processing the request. Please try again or contact your local IT manager.
    What do you want to do now?


    So it doesn't seem to be working on our version I guess, do you guys have any other suggestion or I should just make those field mandatory only after creation?

    Thank you in advance,

    Best regards.

  • 0   in reply to 

    Again, the current_flow.IsPortalFlow is not supported for all scenarios, so I wouldn't recommend trying to use it on a mandatory field rule.

    While not quite exactly the same behavior, you could try to rely on a check for the CreationSource field combined with the entity.Id == null condition. The only issue is figuring out which values to include/exclude in your check. For example CreationSourceEss is the value for regular portal cases, but you may want to include CreationSourceLiveSupport, CreationSourceMobile, CreationSourceVA.