Create a new project
Open your terminal and move to the directory under which you will be creating a new project for your extension.
- Run the following command. This command will display the list of all Zoho Products for which extensions can be developed.
- Use the arrow keys to choose Zoho Desk and press Enter.
$ zet init
? Select the Zoho service for your widget and hit enter key (Use arrow keys)
> Zoho Desk
Zoho CRM
YES
|
- You will be prompted for the Project Name.
- Provide a project name and click Enter. You will have to choose Yes/No based on your need for module support.
Note: We will be discussing module support in detail in a separate post. If you are a beginner developing your first extension, you can choose No.
Now, the project directory with all the necessary folders, dependency code packages, and files will be created.
D:\zet\projects>D:\zet\projects>zet init
? Select the Zoho service for your widget and hit enter key Zoho Desk
? Project Name demoproject
Initializing project at: D:\zet\projects\demoprojects
Installing NPM dependencies…
Project Initialized D:\zet\projects\demoprojects
Run the following commands:
cd demoproject
zet run
|
The image below represents the project's default folder structure. The widget.html file is the default widget created within the project. Let's test this extension using this sample widget.
Testing your extension
You need to perform the following steps to test your extension:
- Start server in your local host
- Activate development mode in Zoho Desk
Starting the server
To start the local host server, navigate to the newly created project's directory and execute the following command.
The http server will start and be accessible through port 5000 of your local machine.
Activate development mode
- Log into your Zoho Desk account.
- Click on the gear icon in the top right corner and go to the Setup page.
- Click Build Extensions under Developer space.
- Click the Enable Developer Mode button in the top right corner of the page.Developer mode will be enabled.
- Go to the Tickets module and open a ticket.
- Click the Extension icon to the right of the Ticket details page. The extension widget page will appear.
We hope you found this post useful. Try it out and let us know your feedback! We really appreciate hearing from you.