This app shows how to use the Jobs feature to create contacts in batches asynchronously that executes for longer duration.
The app enables support agents or admins to:
- Trigger the job from the app to create contacts.
- Check the status of the contacts creation.
- Get the final result of the contact creation job execution.
All operations are performed using the built-in Jobs feature from the Freshworks Developer Platform.
-
Trigger Job
- Create a serverless function to run it as a background job.
-
Make API within job function
- Use Request Method to create a contact. Use any other platform features within the job function depending on the use case.
-
Set Job status
- Set the status of the job while job execution. The final status will be overridden by the platform to notify the overall job status.
-
Clone the repository:
git clone https://github.com/freshworks-developers/jobs-samples.git cd jobs-samples
-
Install the Freshworks CLI:
npm install -g fdk
-
Run the app locally:
fdk run
-
Test the app in Freshservice (or any supported product):
- Create the contact by invoking the job, send job status, view the job status in the app UI.
- Ensure the job actions and concurrent invocations are within Freshworks platform constraints referring to the limits and constraints page.
Feel free to raise issues or PRs to improve the sample app!
GPL-3.0 license