Add or Update a Job
This web service allows you to add or edit a job.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | JobSave | Required |
JobType | String(100) | Type of the job. | Required |
JobGroup | String(40) | Used to group a set of jobs together. If the job is a part of a group job, the group job id will be returned in the response. | Optional |
JobCategory | String(40) | Job category for the job, will be created if it doesn’t exist. | Optional |
JobRef | String(40) | Job reference. | Optional |
JobId | Int | The unique identifier of the job, which can be retrieved using any of the methods listed under add something here. | Optional |
JobPO | String | Job order number. | Optional |
JobDescription | String(500) | Description of the job. | Optional |
JobStart | datetime | Planned job start. Format: yyyy-MM-dd HH:mm:ss, local time. | Optional |
JobDurationMinute | Int | Planned job duration in minutes. Default value is specified under the Admin in the BigChange system. | Optional |
ResourceReference | String(15) | Reference of the resource scheduled for the job. | Optional |
ResourceName | String(50) | Name of the resource scheduled for the job. | Optional |
VehicleReference | String(15) | Reference of the vehicle scheduled for the job. | Optional |
VehicleRegistration | String(50) | Registration of the vehicle scheduled for the job. | Optional |
PreserveSchedule | Bool | Used to preserve the job position (job start date and time, resource and vehicle). Default=false | Optional |
cust_custom field name | String(500) | Pass cust_ followed by the caption of an existing custom field. | Optional |
ContactPersonId | String | Add a specific contact person to a job. See Note. | Optional |
ParentContactPersonId | String | Add a specific contact person, at the parent contact, to a job. | Optional |
JobMustStartAfter | DateTime | Adds a 'Must Start After' constraint set to the UTC datetime value passed. See Note. | Optional |
JobMustStartBefore | DateTime | Adds a 'Must Start Before' constraint set to the UTC datetime value passed. See Note. | Optional |
JobMustCompleteBefore | DateTime | Adds a 'Must Complete Before' constraint set to the UTC datetime value passed. See Note. | Optional |
AlertWhenEnRoute | Bool | When set to 1, will add a contact alert with default miles value (unless selected with next parameter) of 15. | Optional |
AlertMiles | Int | Number of miles to be assigned to the contact alert, when "AlertWhenEnRoute" is set to 1. | Optional |
ContactId | Int | The unique identifier of the contact which can be retrieved using Contact List. | Optional |
ContactReference | String | The internal reference of the contact. | Optional |
ContactName | String | The name of the contact. | Optional |
ContactFirstName | String | This field can be used instead of contact name. | Optional |
ContactLastName | String | This field can be used instead of contact name. | Optional |
IsMainContact | Bool | Sets the contact being changed to the primary contact. The default is true. | Optional |
ContactGroup | String | The name of the contact group. | Optional |
ContactParentReference | String | The internal reference of the parent contact. | Optional |
ContactStreet | String | The street address of the contact. | Optional |
ContactPostcode | String | The postal code of the contact. | Optional |
ContactTown | String | The address town of the contact. | Optional |
ContactCountry | String | The address country of the contact. | Optional |
ContactLat | Double | Latitude coordinates | Optional |
ContactLng | Double | Longitude coordinates | Optional |
ContactRadiusMeter | Int | Radius of circular geofence in meters. | Optional |
ContactPerson | String | The primary person of the contact. | Optional |
ContactPhone | String | Please encode the phone number. | Optional |
ContactEmail | String | Email address for the primary person of the contact. | Optional |
ContactExtra | String | Free format text information about the Contact. | Optional |
ContactWhat3Words | String | Set location using What3Words reference. If supplied, ContactLat and ContactLng will take precedence. | Optional |
ContactReplaceSameRef | Bool | If = 1, a contact already in our database with the specified reference will be updated with the new info. 1 or 0. Default 0 | Optional |
ReturnJobRef | Bool | Set to true to receive the job ref in the response. | Optional |
SecondaryPersons | Int, String, String, String | See Note. | Optional |
RetainSecondaryPersons | Bool | See Note. | Optional |
SalesOpportunityId | Int | Id of Sales Opportunity to link to this job. An invalid Id will be ignored, it will not prevent the job being created. | Optional |
UpdateJobType | Bool | Set to 'True' to update the job type. | Optional |
JobGroupShowOnDevice | Bool | Set 'jobs appear in group on device' tick-box in UI | Optional |
A job will only be scheduled to a resource if a JobStart and either a ResourceReference, ResourceName, VehicleReference or VehicleRegistration is specified.
You will also need to add some parameters to define the contact. You can do this in 2 ways:
- Add all the parameters described in "Contact Save". A new contact will then be created with the job.
- If the contact exists in the BigChange, just add the "ContactReference" parameter with the reference of that contact. It will then be used for the new job.
ContactPersonId
To add a new contact person use the ContactSavePerson service, which will return a ContactPersonId. The ContactListPerson will return all ContactPersons for a specified contact.
SecondaryPersons
Format the String as: GUID1,Name1,Email1,Phone1 : GUID2,Name2,Email2,Phone2. GUID is the global identifier of the contact user. To retrieve this or any other person information, please use the ContactListPerson web service.
RetainSecondaryPersons
If set to 'True' any existing secondary persons associated with the existing job will be retained. If not set, or set to 'False', default behaviour will remove any existing secondary persons and replace with any valid secondary persons passed in SecondaryPersons parameter.
Constraint Date Formats
Add by date and time
- yyyy-MM-ddTHH:mm:ss
- yyyy-MM-dd HH:mm:ss
- yyyy-MM-ddTHH:mm
- yyyy-MM-dd HH:mm
Add for ‘Today’ at a specific time:
- HH:mm:ss
- HH:mm
Prefix with ‘T’ to add for a time only:
- THH:mm:ss
- THH:mm :::
Response Codes
Code | Message | Information |
---|---|---|
0 | null | |
2 | error |
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=JobSave&JobType=dog+walking&JobRef=AGCTEST1&JobDescription=job+description+goes+here&ContactId=7348490
Response Data
{ "Code": 0, "Result": { "jobid": "131252692 " } }