Token's system on a ticket form

Hello Community,

i am working on a project on Freshservice, and some of the spécification and the nerd’s is to make a token system on the incident management process.

explanation :
users are customers, and every customer have an amount of tokens.
so when a customer raise a ticket, the agent Will fill the token’s Field and reply to the customer to tell him for exemple that this ticket Will cost you 15 tokens.so what Will happen here, the custom Field tokens in the user profile Will get ( starking-tokens - 15 ). and if Cost of the ticket is > starting tokens we get an error.

so it’s a simple token system, we have to add a token Field on users profile and a token Field on the ticket

hey @sayah,

Welcome to the Freshworks developer community, We understand your problem,

but could you please explain at which point did you get stuck or need help with it?

Stay Safe :slight_smile:

Hello,
in fact i’m still thinking if i have to make a custom app or if i can do it directly on Freshservice.
i’m stuck in the point that i can’t make a workflow to do (cost - token’s) in the workflow we don’t have math actions on numbers.
so i’m searching for Ann custom app to do that.
i need to perform actions on a Number Field based on the cost so it’s a Little bit complicated

Hello @sayah,

There are a lot of variables in this use case. For example is a customer considered a requester in freshservice? Does ticket creation happen through the support portal by the requester?

If so, then perhaps you add a custom field in the requester’s profile indicating the current level of tokens available (number). You can then retrieve that data through freshservice Request Method. Then in your serverless app you take that data and design a conditional statement that would trigger allow the ticket to be created, and if it doesn’t meet those conditions then perhaps the ticket still gets created and an email is sent to the user explaining they do not have enough tokens for their request. The last part of updating the ticket and sending the email can all be done using workflow automator. There is not an application location that runs on the support portal to my knowledge so it would have to be done on the backend.

Just some ideas. This looks like it would be a fun and interesting challenge. Curious how it goes for you.

Thanks,

Zach

Hello Zachary and thank you for your response,

i am trying to make a custom app, i am new in this Domain, so it’s my first custom app that i’m trying to create, so it Will be a Little bit complicated.
i created the Fields : Fields token in the requester form and Field token in the ticket’s form.
so now i am trying to gather some skills in the app développement part.
i installer everything in my laptop i have all of the environnement ready but i don’t know how to procède, if you have some videos or ressources i am ready to take. @Zach

Hi @sayah,
If you are new to building serverless app, you can find the tutorial at Freshworks Code recipe.