Customer Portal

Get Involved. Join the Conversation.

Topic

    ashish bodhale
    Adding Other contact/secondary contact at the time of...Answered
    Topic posted November 6, 2019 by ashish bodhaleBlue Ribbon: 750+ Points 
    27 Views, 7 Comments
    Title:
    Adding Other contact/secondary contact at the time of creating incident
    Summary:
    Adding Other contact/secondary contact at the time of creating incident
    Content:

    Hi Team,

    We have a requirement where we want to add secondary contacts at the time of creating the incident. We tried to find a way to do it but it seems to be much complex and not doable. Can you please help me out here?

    Thanks,

    Ashish

    Best Comment

    Tushar Gupta

    Hi Ashish,

    You can do this by giving the Option for selecting the Secondary Contacts like Multiselect and create an array of the Contact ID which you could pass to the controller by using AJAX. 

    In the controller, you could add the secondary contacts which you have got to the Incident.

    Thanks

    Comment

     

    • Tushar Gupta

      Hi Ashish,

      I had done something similar to this. My use case was that the person who's logged in the customer portal had the provision to select the Incidents from the list and add himself as the secondary contact. I fulfilled this requirement by creating a custom widget.

      Do you want to search and select the secondary contact in your case?

      Thanks

      • ashish bodhale

        Hi Tushar,

        Thank you for the response. We have the requirement that when the user opens ask page/create incident page, at that moment provide option to add one or more secondary contacts. Can you please provide me some pointers?

         

        Thanks,

        Ashish

        • Tushar Gupta

          Hi Ashish,

          You can do this by giving the Option for selecting the Secondary Contacts like Multiselect and create an array of the Contact ID which you could pass to the controller by using AJAX. 

          In the controller, you could add the secondary contacts which you have got to the Incident.

          Thanks

          • ashish bodhale

            Hi Tushar,

            While doing the analysis, I found out that the secondary contacts can be added using rest api but for that it is required to have incident id. But for me, I have to add the secondary contact directly in Incident.OtherContacts at the time of incident creation where I don't have the incident created. I tried to use it in widget but it didn't work. So having ajax call without incident ID won't work that's what I feel.

            Thanks,

            Ashish

            • Cosimo Galasso

              I the controller you should manage all of those operations .. create the incidents and then the attach to it the secondary contacts.

              First look at the standard model class if they can be used, otherwise create your own custom model.

              CG

    • Robert Surujbhan

      Hi Ashish, if your goal is to automate the creation/assignment of secondary contacts at the time of Incident creation, a Custom Process (aka a CPM or object event handler script) will be a good choice here given the flexibility you have to run these scripts.  Once deployed, these scripts can run when any Incident is created or you can trigger the scripts to run using Rules which lets you add manageable criteria to the execution logic.  The CPM script itself is not difficult if your team is familiar with some PHP programming.  We can share some code with you and there are lots of examples.

      In addition to Tushar's earlier question, can you tell us more about where the info for the secondary contacts will come from?  Will they always be the same for every new Incident?  Or will a newly created Incident have details on the secondary contacts (stored in specific fields, etc.)?

      • ashish bodhale

        Thank you Robert for your suggestion. I have mentioned my requirement on Tushar's comment. Can you please let me know if you can provide me some pointers?

        Thanks,

        Ashish