==== Notifications - Deep Links ==== Story: I want to send a list of vacancies or shifts to a candidate via notifications and the notification should contain a deep link that when they click on it it opens a web page to say that they have been added to the shortlist, update their progress status on the vacancy shortlist, add them to the shift shortlist and log a contact event. \\ \\ There are a number of elements that need to be in place, expand the sections below for details on what needs to be set up. ++++ Shortlist/Progress States| Suitable shortlist states need to be set up in Maintenance - Agency Setup - Progress States and if you are sending shift details Maintenance - Temps Setup - Shift Progress States. ++++ ++++ Hub| A dedicated IQXHub for Deep Link Jobs must be active and the RunJob Schedule Group and RunJob UserID should be set in the ini, the UserId is used as the consultant linked to the Progress and Shift Progress records created. This example is based on a local hub. ++++ ++++ Elements for the Notification| **Boiler Plate Text** - If you want to send individual lines for each shift then you will need a Boiler Plate Text item set up called SHIFTLINES with a type of Notification. It is HTML code and will refer to a Custom Merge Field. Only required for sending shift lines. \\ \\ _literal_{SHF_DATE}{SHF_FROM} {SHF_TO} Accept Booking<< \\ \\ This example should be amended so that 'localhost:54000' is changed to the address of the hub that will run the job and 'UpdateProgressAndShiftProgress.xml' is changed to the name of the job that is being run. \\ \\ **Custom Merge Field** - again only required if you are sending individual shift information. The category should be Shift, our example is called DEEPLINKQUERYBOOK and the SQL should be 'SELECT string('vacancyid=',vacancyid,'&tempshiftplanid=', tempshiftplanid) from tempshiftplan where tempshiftplanID = #' tick for Notifications only. \\ \\ **Sample Notification** \\ \\ Two notifications are required one to create the web page and another that will be selected from the notifications button. \\ \\ The notification that is used to draw a web page is called HTMLTEST in this example (this is the name specified in the custom merge field if you are using it and the subsequent notification template), type of Job. The contents of the web page can be customised to each agencies requirements. Product example for Bootstrap

Thank you {{APP_NAME} for registering your interest, one of our consultants will be in touch.

The second notification is the one that will be selected by the user, the type will depend on where you want to send the list from, if during the fill shifts process then the type should be QueryBook or if it is from the progress view on the person selector the type should be APP_ProgressContact. You also need to set the contact event type, updated progress state and if sending shift lines the Shift Lines in the top right section of the notification form. \\ \\ QueryBook Example {{app_name} {{SHN_BEGIN} {{SHN_END}
Company {{SHN_vac_sitename}
Contact {{SHN_vac_sitecontact}
reference {{SHN_vac_refcode}
position {{SHN_vac_position}
Shifts
{{SHF_SHIFTLINES}
--------------
\\ \\ App_ProgressContact Example - as this one doesn't send shift lines it doesn't include the Boiler Plate text instead the link is contained within the notification itself {{PRG_BEGIN} {{PRG_END}
{{vac_refcode} {{com_companyname} {{com_addr1} {{VAC_POSITION} Accept Booking<<
++++ ++++ Job| The job will need to be added to the jobs folder on the hub server and is triggered when the link is clicked. The job can be customised to your agency requirements, the example below updates the progress state, adds to the shift progress and logs a contact event. {dtemplate} select PERSON.personid,person.name as recipients, isnull((select top 1 progressid from progress where progressid is not null and progress.personid = person.personid and vacancyid = :vacancyid),'') as pg, (select progressstatus from notificationtemplate where notificationtemplateid = :templateid) as pstatus, (select classcode from notificationtemplate where notificationtemplateid = :templateid) as ccode, (select Classdescrip from contactclass where classcode = ccode) as cdesc from person where person.personid = :personid and exists (select * from vacancy where vacancyid = :vacancyid) INSERT INTO tempshiftprogress ( TempShiftProgressID,TempShiftPlanID,Status,StaffID,PersonID,WhenEntered ) VALUES ( Uniquekey(''), :tempshiftplanid, 'S', userstaffid, :personid, current timestamp ); Insert into progress(progressid, personid, vacancyid, status, actiondate, staffid, Note) values (:progid ,:personid,:vacancyid,:pstatus,current date, userstaffid,'Deep Link') update progress set actiontime=current time, actiondate =current date, status= :pstatus where personid = :personid and vacancyid = :vacancyid call GenerateContactEventEmailLog (:ceid, current timestamp, :recipients, '', 'IN', 'LINK') WriteWebPage ++++