Let us understand the goal in this section. The “Say Hello” app should,
- Have a button interface that says “Say Hello”.
- Take Freshservice domain from the app configuration.
- Use OAuth to access Freshservice API and ask for authorisation from the admin.
- Create a ticket in the Freshservice account and notify the agent a ticket is created.
Approach
- We will use the Freshworks’ UI components library Crayons to show a button interface with minimal code.
- Use installation parameters to get Freshservice domain from admin.
- Get OAuth credentials from the developer portal to access Freshservice API from the app.
- Use OAuth credentials in the app to get authorisation from the admin.
- Use Request Method feature to use OAuth and make API request from the app.
- Finally, we use the Interface method feature to notify the user of ticket creation action.