Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
linenumberstrue
https://<server host>/servicemanager/rest/CampaignAPI/insertLeadsFastinsertLeadFast


URL Parameters:

ParameterDescriptionRequired
fTemplateId

Campaign Template id of the Template that the lead will be associated with.

See 16.0 Get Campaign Template List to obtain Template Id's

Yes
fCampaignId

Campaign id of the Campaign that the lead will be associated with.

See 17.0 Get Campaign List to obtain a list of campaign Id's.

Yes
fAllocationId

Allocation id of the Campaign that the lead will be associated with.

See 18.0 Get Allocation List to obtain a list of allocations.

Yes
allowDuplicatesIf true checking for duplicate phone numbers will NOT be performed .No
apiKeyapi key provided by Noojee SupportYes

...

ParameterDescriptionRequired
njExternalLeadIdA reference, account number or the like taken from the external data source. Also used to identify lead when updates are made.No
njCallBackDate

The date and time on which the lead is to be called. If not specified the lead is treated as a 'new' lead and will be called on a first come first served basis.

Format is "yyyy/MM/dd HH:mm". Note that when setting a call back date the time is treated as being in the Contact Hours timezone.

If you want to inject a lead to be dialed immediately then you need to convert the current time to the contact hours time. Noojee Contact will normally be configured so the 'system time' is in the timezone where the main team is located.

No
njPriorityA priority between 0 and 100. The lower the number the higher the priority. Higher priority leads will be called before lower priority calls. Default priority is 10.No
njContactHoursSets the Contact Hours for the lead. If not passed the lead will default to the Campaign Templates default Contact Hours.No

...

Code Block
{"fieldname1": "lead 1 field 1 value", "fieldname2" ,: "lead 1field 2 value"}
, {"fieldname1": "lead 2 field 1 value", "fieldname2" ,: "lead 2 field 2 value"}

Curl Sample query:

Code Block
linenumberstrue
curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X POST 
-d '{"Name":"Jane Smith","StreetAddress":"Suite 8/10 Hoddle St", "City": "Abbotsford", "State":"Vic"
, "PostCode":"3064", "FirstPhone":"0383218199"}' 
'https://<server host>/servicemanager/rest/CampaignAPI/insertLeadFast?fTemplateId=41&fCampaignId=41
&fAllocationId=38&apiKey=f863246a-973e-11e6-8784-08002718f5b5&allowDuplicates=true'

...

CodeMessageHTTP statusDescription
0OK200The lead was successfully inserted or updated.101COULDNT_FIND_THE_LEAD400For an update, the njExternalLeadId didn't match a lead
102NO_PHONE_FIELDS400For an import the The lead doesn't have and phone numberscontain any fields designated as phone number fields.
103EXCEPTION500A server error occured. Call Noojee Support.
104DNC400The lead's phone numbers are on the DNC list
105DUPLICATE400There is already a lead with this phone number
106INVALID_DISPOSTION400When updating, the supplied disposition doesn't exist.
107DISPOSTION_ISNT_SET_AND_NOCHANGE_SPECIFIED400When updating a a lead the disposition can be omitted, and <NO CHANGE> specified. But this is an error condition if the lead doesn't already have a disposition.
108IMPORT_BUT_NOCHANGE_SPECIFIED400Tried to insert a lead but a field contained the value '<NO CHANGE>' which is only valid for updates.
109TIMEOUT_TOO_MANY_CONCURRENT_REQUESTS400

There are too many concurrent insert/update API requests. Wait a bit and then retry the insert/update.

Currently a call will timeout if it is delayed by more than 1 minute.

Note: you MUST have a timeout in excess of 60 seconds on your requests as our system can can take up to 1 minute to respond.

110LEAD_NOT_UPDATED_DUE_TO_CONFLICT400The lead update caused a conflict with another update and failed. This usually means that a user was editing the lead whilst you were trying to update it via the api. This type of issues should be rare as in most cases the user will see the error not the api. When the user sees the error they will be given the opportunity to merge the two leads via a specialised merge lead screen. If the api recieves this error then you will need to manually intervene to ensure that data isn't over-written which a simply retry is likely to do.
111INVALID_TIMEZONE_SPECIFIED400The lead contained an unknown Contact Hours (timezone).
112DUPLICATE_EXTERNAL_ID400The value passed via njExternalLeadId already exists in the Campaign.
114INVALID_CALLBACK_DATE_FORMAT400The supplied callback date is in an invalid format.
115ALLOCATION_ID_REQUIRED400A valid Allocation ID was not passed in.
116TEMPLATE_ID_REQUIRED400A valid Campaign Template ID was not passed in.
117CAMPAIGN_ID_REQUIRED400A valid Campaign ID was not passed in.