Is there a method to display the Freshservice app on portal pages specifically for Requesters' view?

Here is what I need: 1. The user will input a subject. 2. Based on the subject, I need to make a call to a third-party REST API (Unfortunately, it is currently blocked by CORS and even JSONP requests are not working). 3. After receiving the response, I want to automatically populate certain field values on the form.

Answer №1

Currently, it is not possible to display a Freshservice app from the customer's perspective (User/Employee/Requester). However, you can develop a Freshservice app on the Agent portal where tickets are handled.

  1. Begin by creating a serverless app.
  2. Utilize the onTicketCreate product event to implement your logic in server.js:

exports = {
    events: [{
        event: "onTicketCreate",
        callback: "onTicketCreateCallback"
    }],
    onTicketCreateCallback: function(payload) {
        console.log("Displaying arguments from onTicketCreate event: " + JSON.stringify(payload));
        // 1. Develop the logic based on the ticket subject provided in the payload.
        // 2. Use the platform's request API to bypass CORS - https://developers.freshservice.com/docs/request-api/
        // 3. Update fields using - https://api.freshservice.com/v2/#view_a_change
    }
}

  1. Refer to this documentation for modifying agent-facing field values.

In essence, this process entails populating fields according to your requirements. The key distinction is that this occurs when a ticket is created, rather than when filling out the requester-facing form.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Looking for a way to efficiently add multiple value inputs to a JSON object using jQuery or JavaScript?

Here is the HTML input tag code I am working with: <form id="info"> <input id="A" name="A" type="hidden" nodetye="parent" value="A"> <input id="A1" name="A1" type="text" nodetype="child" value="a1val"> <input id="A2" name ...

utilizing numerous conditional renderings within a mapping function

Hello there, I'm curious if there is a more efficient method to display my todos. Currently, my code looks like this: { todos.map((todo) => ( todo.status === 1 && ( ...

Disappearing Image on Hover in JavaScript and HTML

I'm encountering an issue with my JavaScript hover effect on two images. When a user hovers over the arrow image, it should change to a hover version of that image. Additionally, if the user clicks on the arrow, it should trigger another JavaScript fu ...

Crafting Effective AngularJS Directives

Recently, I've been delving into AngularJS and have grasped the core concepts quite well. As I embark on building my own application, I find myself struggling with laying out the blueprint, particularly in terms of directive design. Are there any not ...

Trigger oncopy on the body excluding specific class

Is there a way to execute a function on document.body.oncopy but exclude a certain class (defined for div elements) from this function call? I want to avoid calling the function on specific classes, is there a method to achieve this? ...

Interacting with various cookies created from user-provided input (specifically from textboxes) simultaneously

I'm facing a challenging problem and I'm in need of some assistance. The task at hand is to create three text boxes for users to input values for cookies named: name, city, and hobby. Then, using a single button with an onclick event, a function ...

What is the best way to create an array within an object during the parsing process

When working with a JSON object, I need to assign a value stored in the session against an ID. The JSON data is as follows: [ { "id": "a", "text": "a", "icon": true, "li_attr": { "id": "a" }, "a_attr": { "href": "#" ...

Creating a dynamic circle that expands in size based on the duration the user presses down (using Java Script)

I have a fun challenge for you! I want to create a growing circle on a canvas based on how long you hold your mouse button. Currently, I can draw a fixed width circle where my mouse was when I clicked, but I need it to dynamically change size as you hold t ...

Maintaining personalized variable values for individual connected clients in Node.js: What's the best approach?

I have recently started working with Node.js and I am using Visual Studio 2015 with the Basic Node.js Express 4 app template. After setting some values through a post request from the client, I noticed that when I open another tab and send another post re ...

Rails may encounter issues with the format of parameters in ajax requests at times

Something strange is happening with my form: The form looks like this: <form id="my-form" method="post" action="/password_reset/update/<%= @user.perishable_token %>" charset="utf-8" autocomplete="off"> <input type="password" name="use ...

What could be causing my function to output unicode replacement characters instead?

As I work on enhancing password security by implementing encryption, my goal is to store the hashes and perform encryption/decryption during signup/login processes. The encryption process works smoothly, converting from utf8 to hex without any issues. Howe ...

Creating a 3D object using three.js framework

When playing video games, I often notice a common pattern where hovering the mouse over an object triggers a gradient highlight around its 2D representation. To recreate this effect in my Three.js scene, I started by setting up the necessary raycaster vari ...

The Strophe.muc plugin and backbone improper binding of callbacks

Following the initial group message, I'm experiencing an issue with the strophe.muc plugin not responding to subsequent messages. Although I receive the first presence, message, and roster from the room, any additional messages and presence stanzas do ...

Encountering a 404 error when utilizing {{url()}} within Laravel's Ajax feature

Hello, I encountered an error while working with ajax on laravel. The console is showing a 404 error, here's my ajax code: $('#btn_search_postcode').click(function(e){ let postcode = $('#postcode').val(); if(postcod ...

Why is my ASP.NET checkbox losing its value after postback because of a JavaScript/jQuery array?

I'm facing an issue with a simple asp:RadioButtonList nested inside a form tag where it's not retaining its value on postback. Here's the code snippet: <form runat="server"> <div class="Form"> <span class="FirstField"> ...

Ways to thwart CSRF attacks?

I am currently looking for ways to protect my API from CSRF attacks in my Express app using Node.js. Despite searching on both Google and YouTube, I have been unable to find a solution that works for me. One tutorial I watched on YouTube recommended gene ...

The tools needed for securing a web application with ExpressJS include the use of

I recently implemented an upload function using connect-form with formidable and https://github.com/ctavan/express-validator. While attempting to sanitize an image from XSS, I encountered a 'TypeError: Cannot call method 'replace' of undefin ...

Creating a system to add and limit dynamic fields with a counter in jQuery

Check out this fiddle link http://jsfiddle.net/gKJEs/80/ I'm looking for a way to limit the number of rows that can be added, let's say up to 5. Here is the HTML code: <table id="table"></table> <button id="addRowBtn">Add Ro ...

Linking input to radio buttons in Vue.js

When creating an edit form page, I encountered an issue where the page was not loading properly. Before the page loaded, I ran the following code: beforeMount(){ if(this.$route.meta.mode === 'edit'){ this.initialize = '/api/arti ...

Cause $.ajax to fail

Can you believe it, I have a peculiar request. I need to find a way for $.ajax to fail so I can test my fail trigger. Check out this snippet of jQuery code: $(document).ready(function () { $("#trigger").on("click", function () { $.ajax({ ...