This article will walk you through the steps of testing a form’s Dispatch Rule in the ServiceForms Connector. Admin users of ServiceTrade can access the ServiceForms Connector by visiting serviceforms.servicetrade.com and logging in with their ServiceTrade credentials.
To test a form’s Dispatch Rule, first select the form from the list and click the rule under “Dispatch to:.”
Next, click the green “Test Rule” button in the action bar at the bottom of your screen.
The next page will ask you for three things: the Job ID, the Device ID, and the Appointment ID (which is optional). The steps to obtain each of these are detailed below.
Job ID
To obtain the Job ID, first navigate to the Job in ServiceTrade. Once on the Job page, the Job ID is the string of numbers at the end of the address bar, formatted https://app.servicetrade.com/jobs/XXXXXXXX (X’s will be replaced by the actual Job ID).
In this example, the Job ID is “14388270.”
Copy and paste the Job ID into the associated field in the ServiceForms Connector.
Device ID
To obtain the Device Magic Device ID, navigate to your Device Magic Management Console at devicemagic.com. Select “Devices” from the column on the left hand side of your screen.
Find the user whose device you are using for testing and click on their name. The Device ID will be listed in the “Identifier” field. Copy and paste the Device ID into the associated field in the ServiceForms Connector.
Appointment ID
To easily obtain the Appointment ID, you must be using Google Chrome as your browser. First, navigate to the Job page in ServiceTrade, right click anywhere on the page, and select “Inspect.”
This will open the Chrome Developer Tools in a bar along the bottom or side of your browser. Select the tab labeled “Console.”
Copy and paste the following command into the console, replacing the X’s with the Job ID:
DW.Api.get('/api/appointment?jobId=XXXXXXX', {}, function (d) { console.log(d.data.appointments[0].id); });
X’s have been replaced with the example’s job ID.
After copying and pasting the above command into the console, press “Enter.” The string of numbers returned by the command will be the Appointment ID. Copy and paste it into the ServiceForms Connector.
If you have a Job with multiple appointments (with different forms dispatched for different appointments, for instance), and you need a specific appointment ID, count the appointments on the Job (starting from “0”) and replace the “[0]” in the above command with the number of the desired appointment in square brackets.
Note: the first appointment on the Job is always numbered “[0].” So if you need the ID for the third appointment, that would be “[2].”
Testing the Rule
Once you have filled the fields with the Job ID, Device ID, and the Appointment ID (optionally), click the blue “Test Rule” button in the bottom right corner.
If the test is successful, you will see a green “Success” message appear in your browser, and the user whose Device ID is being used will receive a notification on their device that the form has been dispatched to them.
If they miss the notification, they can find the form under the “Dispatches” tab in the Device Magic Mobile Forms app.
If you receive an error when trying to test your Dispatch Rule, or have any other issues, contact our ServiceForms support team at serviceforms@servicetrade.com.
Comments
0 comments
Article is closed for comments.