notifications_deeplink

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notifications_deeplink [2023/04/19 11:35] Shelley Hunternotifications_deeplink [2023/04/19 14:03] (current) Shelley Hunter
Line 10: Line 10:
  
 ++++ Hub| ++++ Hub|
-IQXHub must be active and the RunJob Schedule Group and RunJob UserID should be set, the UserId is used as the consultant linked to the Progress and Shift Progress+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| ++++ 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. \\ \\ +**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_<tr><td>{SHF_DATE}</td><td>{SHF_FROM}</td> <td>{SHF_TO} </td><td> <a href="http://localhost:54000/iqxjob/public_670.xml?personid={APP_PERSONID}&{SHF_JSONQUERYBOOK}&templateid={LET_TEMPLATEID}&displaytemplateid=HTMLTEST"><font color="#FF4D4D">Accept Booking</font></a><u><font color="#FF4D4D">&lt;&lt;</font></u></td></tr> \\ \\ +_literal_<tr><td>{SHF_DATE}</td><td>{SHF_FROM}</td> <td>{SHF_TO} </td><td> <a href="http://localhost:54000/iqxjob/UpdateProgressAndShiftProgress.xml?personid={APP_PERSONID}&{SHF_DEEPLINKQUERYBOOK}&templateid={LET_TEMPLATEID}&displaytemplateid=HTMLTEST"><font color="#FF4D4D">Accept Booking</font></a><u><font color="#FF4D4D">&lt;&lt;</font></u></td></tr> \\ \\ 
-The example should be amended so that 'localhost:54000' is changed to the address of the hub that will run the job and 'public_670.xml' is changed to the name of the job that is being run. \\ \\ +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 call it JSONQUERYBOOK and the SQL should be 'SELECT string('vacancyid=',vacancyid,'&tempshiftplanid=', tempshiftplanid)+**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. \\ \\ from tempshiftplan where tempshiftplanID  = #' tick for Notifications only. \\ \\
 **Sample Notification** \\ \\ **Sample Notification** \\ \\
Line 31: Line 31:
     <meta name="author" content="">     <meta name="author" content="">
     <link rel="icon" href="/docs/4.0/assets/img/favicons/favicon.ico">     <link rel="icon" href="/docs/4.0/assets/img/favicons/favicon.ico">
- 
     <title>Product example for Bootstrap</title>     <title>Product example for Bootstrap</title>
- 
     <link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/product/">     <link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/product/">
- 
     <!-- Bootstrap core CSS -->     <!-- Bootstrap core CSS -->
     <link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet">     <link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet">
- 
     <!-- Custom styles for this template -->     <!-- Custom styles for this template -->
     <link href="https://getbootstrap.com/docs/4.0/examples/product/product.css" rel="stylesheet">     <link href="https://getbootstrap.com/docs/4.0/examples/product/product.css" rel="stylesheet">
   </head>   </head>
- 
   <body>   <body>
- 
-    <nav class="site-header sticky-top py-1"> 
-      <div class="container d-flex flex-column flex-md-row justify-content-between"> 
-        <a class="py-2" href="#"> 
-          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="d-block mx-auto"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg> 
-        </a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Tour</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Product</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Features</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Enterprise</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Support</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Pricing</a> 
-        <a class="py-2 d-none d-md-inline-block" href="#">Cart</a> 
-      </div> 
-    </nav> 
- 
     <div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light">     <div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light">
       <div class="col-md-5 p-lg-5 mx-auto my-5">       <div class="col-md-5 p-lg-5 mx-auto my-5">
-        <h1 class="display-4 font-weight-normal">Punny headline</h1> +        <h1 class="display-4 font-weight-normal">Thank you  {{APP_NAME} for registering your interest, one of our consultants will be in touch.</h1>
-        <p class="lead font-weight-normal">And an even wittier subheading to boot. Jumpstart your marketing efforts with this example based on Apple's marketing pages.</p> +
-        <a class="btn btn-outline-secondary" href="#">Coming soon</a>+
       </div>       </div>
       <div class="product-device box-shadow d-none d-md-block"></div>       <div class="product-device box-shadow d-none d-md-block"></div>
       <div class="product-device product-device-2 box-shadow d-none d-md-block"></div>       <div class="product-device product-device-2 box-shadow d-none d-md-block"></div>
     </div>     </div>
- 
-    <div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3"> 
-      <div class="bg-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> 
-        <div class="my-3 py-3"> 
-          <h2 class="display-5">You have placed yourself onto the short list for the day</h2> 
-          <p class="lead">or an even wittier subheading.</p> 
-        </div> 
-        <div class="bg-light box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> 
-      </div> 
-      <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> 
-        <div class="my-3 p-3"> 
-          <h2 class="display-5">Another headline</h2> 
-          <p class="lead">And yet another wittier subheading.</p> 
-        </div> 
-        <div class="bg-dark box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> 
-      </div> 
-    </div> 
- 
-    <footer class="container py-5"> 
-      <div class="row"> 
-        <div class="col-12 col-md"> 
-          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="d-block mb-2"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg> 
-          <small class="d-block mb-3 text-muted">&copy; 2017-2018</small> 
-        </div> 
-        <div class="col-6 col-md"> 
-          <h5>Features</h5> 
-          <ul class="list-unstyled text-small"> 
-            <li><a class="text-muted" href="#">Cool stuff</a></li> 
-            <li><a class="text-muted" href="#">Random feature</a></li> 
-            <li><a class="text-muted" href="#">Team feature</a></li> 
-            <li><a class="text-muted" href="#">Stuff for developers</a></li> 
-            <li><a class="text-muted" href="#">Another one</a></li> 
-            <li><a class="text-muted" href="#">Last time</a></li> 
-          </ul> 
-        </div> 
-      </div> 
-    </footer> 
- 
- 
     <!-- Bootstrap core JavaScript     <!-- Bootstrap core JavaScript
     ================================================== -->     ================================================== -->
Line 124: Line 62:
     </script>     </script>
   </body>   </body>
-</html></sxh>+</html> 
 +</sxh>
  
 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. \\ \\ 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. \\ \\
Line 162: Line 101:
 <Library> <Library>
  <WriteWebPage>  <WriteWebPage>
- 
  <Setvariable name="dtemplate" sql="select  TemplateHTML  from NotificationTemplate where NotificationTemplateid = :displaytemplateid"/>  <Setvariable name="dtemplate" sql="select  TemplateHTML  from NotificationTemplate where NotificationTemplateid = :displaytemplateid"/>
- 
  <if x1="{dtemplate}" x2="" comparison="!=">  <if x1="{dtemplate}" x2="" comparison="!=">
-     <Write>{dtemplate}</Write>+          <Write>{dtemplate}</Write>
  </if>  </if>
  </WriteWebPage>  </WriteWebPage>
 </Library> </Library>
- 
    <Parameters>    <Parameters>
- <Parameter name="personid"/> + <Parameter name="personid"/> 
- <Parameter name="vacancyid"/> + <Parameter name="vacancyid"/> 
- <Parameter name="tempshiftplanid"/> + <Parameter name="tempshiftplanid"/> 
- <Parameter name="templateid"/> + <Parameter name="templateid"/> 
- <Parameter name="displaytemplateid"/> + <Parameter name="displaytemplateid"/> 
-   </Parameters> +   </Parameters>  
- +   <SetVariable name="progid" value=""/>
-  +
-  +
-      <SetVariable name="progid" value=""/>+
  
  <Block>  <Block>
-  + <BeginTransaction/> 
-                 +                    <SQLQuery> 
- <BeginTransaction/>+ <SQLSelect> 
 +     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) 
 + </SQLSelect>
  
-   <SQLQuery> + <IfAnyRows>  
- <SQLSelect> + <SQLExec>INSERT INTO tempshiftprogress ( TempShiftProgressID,TempShiftPlanID,Status,StaffID,PersonID,WhenEntered ) VALUES ( Uniquekey(''), :tempshiftplanid, 'S', userstaffid, :personid, current timestamp ); 
- 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, +                        </SQLExec> 
- (select progressstatus from notificationtemplate where notificationtemplateid = :templateid) as pstatus, +                     <if x1="{pstatus}" x2="" comparison="!="> 
- (select classcode from notificationtemplate where notificationtemplateid = :templateid) as ccode, + <SetVariable name="progid" value="{uniquekey}"/> 
- (select Classdescrip from contactclass where classcode = ccode) as cdesc + <if x1="{pg}" x2=""> 
-  from person  where person.personid = :personid and   +            <SQLExec>Insert into progress(progressid, personid, vacancyid, status, actiondate, staffid, Note) values (:progid ,:personid,:vacancyid,:pstatus,current date, userstaffid,'Deep Link')  
-   exists (select * from vacancy where  vacancyid = :vacancyid) +      </SQLExec>  
- </SQLSelect> + </if> 
- <IfAnyRows> + <else>  
-  +      <SQLExec>update progress set actiontime=current time, actiondate =current date, status= :pstatus 
- <SQLExec>INSERT INTO tempshiftprogress ( TempShiftProgressID,TempShiftPlanID,Status,StaffID,PersonID,WhenEntered )  + where personid = :personid and vacancyid = :vacancyid 
- VALUES ( Uniquekey(''), :tempshiftplanid, 'S', userstaffid, :personid, current timestamp );</SQLExec> +                                     </SQLExec> 
-  + </else>  
-  + <SetVariable name="progid" sql="select progressid from progress where personid = :personid and vacancyid = :vacancyid"/>  
-    +     </if> 
-   <if x1="{pstatus}" x2="" comparison="!="> +     <if x1="{ccode}" x2="" comparison="!="> 
- <SetVariable name="progid" value="{uniquekey}"/> + <SetVariable name="ceid" value="{uniquekey}"/> 
- <if x1="{pg}" x2=""> + <SQLExec><![CDATA[insert into contactevent (contacteventid,staffid, personid,vacancyid, progressid, description,  who, Contactdate, Contacttime, classcode) 
-  +           values (:ceid, userstaffid, :personid, :vacancyid, nullif(:progid, '') , :cdesc,  'A', current date, current time, :ccode);]]> 
-  +                                </SQLExec> 
- <SQLExec>Insert into progress(progressid, personid, vacancyid, status, actiondate, staffid, Note) values ( + <SQLExec>call GenerateContactEventEmailLog (:ceid, current timestamp, :recipients, '', 'IN', 'LINK') 
- :progid ,:personid,:vacancyid,:pstatus,current date, userstaffid,'Deep Link')  +                                </SQLExec>  
- </SQLExec>  +     </if>  
- + <Call>WriteWebPage</Call> 
- </if> + </IfAnyRows> 
- <else> + <IfNoRows>  
-  + </IfNoRows>
- <SQLExec>update progress set actiontime=current time, actiondate =current date, status= :pstatus +
- where personid = :personid and vacancyid = :vacancyid</SQLExec> +
-  +
- </else> +
-  +
- <SetVariable name="progid" sql="select progressid from progress where personid = :personid and vacancyid = :vacancyid"/> +
-  +
-   </if> +
-   <if x1="{ccode}" x2="" comparison="!="> +
-  +
- <SetVariable name="ceid" value="{uniquekey}"/> +
- +
- <SQLExec><![CDATA[ +
- insert into contactevent (contacteventid,staffid, personid,vacancyid, progressid, description,  who, Contactdate, Contacttime, classcode) +
- values (:ceid, userstaffid, :personid, :vacancyid, nullif(:progid, '') , :cdesc,  'A', current date, current time, :ccode); +
- ]]></SQLExec> +
- +
- <SQLExec>call GenerateContactEventEmailLog (:ceid, current timestamp, :recipients, '', 'IN', 'LINK')</SQLExec>  +
-  +
-   </if>  +
-   <Call>WriteWebPage</Call> +
- </IfAnyRows> +
- <IfNoRows> +
-  +
- </IfNoRows>+
        
- </SQLQuery>  +     </SQLQuery>  
-  <Commit/> +     <Commit/>
- +
  </Block>  </Block>
  <Catch>  <Catch>
- +    <Rollback/>
-    <Rollback/> +
- +
  </Catch>  </Catch>
-  
-  
- 
 </Job></sxh> </Job></sxh>
 ++++ ++++
  • notifications_deeplink.1681904157.txt.gz
  • Last modified: 2023/04/19 11:35
  • by Shelley Hunter