How to setup the Portal

Root > 3. Customisation

 

Portal - Technical explanation
Examples of Portals here

You can have as many Portals as you need, examples could include

  • Self Service
  • Facilities Management
  • Artwork Approval
  • Event Management
  • Estate Agency
Your portals will be unique to you, if you require assistance in customisation please email support@wiredcontact.co.uk with details of the assistance you require.

What follows below is a technical explanation that will not be of interest to regular users.
   
 

The portal function allows you to setup a site where your customers may view/update their own record information in the WiredContact database. Additionally, customers can add subentity information, like history items, notes, or if you have setup other subentity tables, items like work orders or other types of requests.

When setting up/trouble shooting the WiredContact Portal, make certain you are not logged in as a valid WiredContact user. The Portal function is a subset of the lead function. To call the portal function, your URL would look like:

wceweb.dll?function=lead&page=[template name]

An example hyperlink might look like:
<a href="http://www.mydomain.com/wirede/wceweb.dll?function=lead&page=portal/login.html">Portal Login</a>

Before a customer can use the Portal function to login to their records, they must be setup in the database with a userid/password as well as the appropriate value in the Lead Lock field. The Lead Lock field, as well as the value that unlocks the customer record, is located in the Table Defaults .

Select a field for the "Lead Lock" field, and the value for when a customer is allowed to log into their record in the "Lead Lock Open Value" field, then for each customer that you want to be able to access their customer record(s) - set the Lead Lock field to the appropriate value. You will probably want to setup this field as a checkbox on one of the contact templates to facilitate allowing a customer to login.

Additional fields are available in the Table Defaults to show you how many times and when a customer has accessed the Portal system. Click the "+" icon next to the Lead Lock field in the table defaults to set/see these fields.

The WiredContact example Portal templates can be found in the e:\web\wiredcontact\Portal folder. The templates provided are examples. You can follow the example templates, or build your own functionality based on the Portal/Lead functions. Below are descriptions of the various example templates:

  • Login.html - example login template. The tags to use for the Login.html are:
    • <#LEADLOGIN - this tag specifies the fields to use for the username/password.
      Primary Parameters:
      • uidfield=[field name] - field to use for the userid field. Email address is aa common choice.
      • pwfield=[field name] - field to use for the password field.
      • Retry="text" - the text to show when a customer has entered an invalid uid/pw combination.
      • page=[template name] - the template to use when the login is successful.
    • <#input - this tag has the same attributes as the Standard <#Input... tag. You will need one of each of these tags for the fields specified in the <#LeadLogin tag for the uidfield and pwfield.

    Additional Functions:
    • Lost Password Links - you may need to supply a link to allow users to request a lost password. The lost password function is a subset of the lead function. To call the lost password function, your URL would look like:
      wceweb.dll?function=lead&lpw=y&page=[template name]

      An example JavaScript onclick link might look like:
      <a href=# onClick="lpw=window.open('wceweb.dll?function=lead&lpw=y&page=Portal\\LostPassword.html','lpw','top=30, left=30, height=270, width=735, toolbar=no, menubar=no, titlebar=yes');lpw.focus();return false;">Forgot Password?</a>

  • LoginLanding.html - example portal landing template. After a customer logs in, the information from the customer's main contact record (wce_contact) can be displayed as static text(<#Field...> tags) or as fields the customer can update (<#Input...> tags). Information changed must be submitted via a standard html form submit. The example LoginLanding.html template uses a JavaScript function to submit the form via the document.forms[0].submit(); function.

    Standard Portal tags include:

    • <#dynamic> - required tag to indicate that this template is a template the customer can view after they login. If this tag is not present, the page will display with an error message.
    • <#ajaxjs> - if you need to use any of the Ajax functions, you must include this tag.
    • <#recordhistory - if the customer updates their record, this tag will record their changes to the customer's history in WiredContact. The only parameters are:
      • Subject="Changed Via Portal" - specify the subject of the recorded history.
      • Type="Portal Update" - specify the history type of the recorded history
    • <#recordemail - if the customer updates their record, this tag will generate the email specified in the associated field trigger. In order for an email to be sent, a corresponding Field Trigger needs to be created. The parameters are:
      • Field=[field name] - specify the field that the Field Trigger was created for
      • Portal - specifies that the field trigger created was for Portal changes only. If the field trigger wasn't created for portal access only - emails will be sent when ever the field value changes.
      • Subject="Changed Via Portal" - specify the subject of the email - overrides the subject set in the field trigger.
    • <#postemail - similar to the <#recordemail tag, but is more flexible. if the customer updates their record, this tag will generate the email specified by the tag parameters. See the <#PostEmail... help for more information.

    Additional Functions:
    • Link to another view. To show another view for the customer's contact record, you need to construct a URL for the lead function, pass the current customer record's uniqueid field value as a parameter named "eid", and call another template. Additionally, you must supply the &lc=y parameter to continue the current lead function (display contact data after portal login). The URL might look like:
      wceweb.dll?function=lead&etable=wce_contact&eid=<#field field=uniqueid>&lc=y&page=[template name]
    • Saving and continueing to another view. To show another view for the customer's contact record after the current view is saved, add a hidden <input tag with the name "nextpage". Then use a JavaScript function to set the "nextpage" parameter and submit the form. Setting the "nextpage" parameter and using the submit() function continues the current lead function (display contact data after portal login). For example:

      <script language=javascript>a
      <!--
      function saveandcontinue() {
      document.forms[0].nextpage.value = 'portal/anotherview.html';
      document.forms[0].submit();
      }
      -->
      </script>
      <input type=hiddn name=nextpage>

    • Linking to list views. To show list views of subentity records for the customer's contact record, you need to construct a URL for the lead function, pass the current customer record's uniqueid field value as a parameter named "eid", and call a template with one or more Subentity Section s. The URL might look like:
      wceweb.dll?function=lead&etable=wce_contact&eid=<#field field=uniqueid>&lc=y&page=[template name]

      An example complete hyperlink might look like:
      <a href="wceweb.dll?function=lead&page=portal\ListHistory.html&etable=wce_contact&eid=<#field field=uniqueid>&lc=y>Show History</a>

    • Add a subentity item. To add a subentity records for the customer's contact record, you need to construct a URL for the subentity function, pass the current customer record's uniqueid field value as a parameter named "eid", pass the subentity table for the type of record you wish to add, and call a template with the appropriate <#Input... tags. The URL might look like:

    • wceweb.dll?function=subentity&etable=wce_contact&eid=<#field field=uniqueid>&stable=wce_history&new=y&page=[template name]

      An example complete hyperlink might look like:
      <a href="wceweb.dll?function=subentity&etable=wce_contact&eid=<#field field=uniqueid>&stable=wce_history&new=y&page=portal\GeneralEmail.html>Contact WiredContact via Email</a>
      - the above example template sends an email as well as posting an item to the wce_history table.
      The template used for adding a subentity item needs to override the default savefunction and savepage behaviors defined in the Table Defaults . The example template e:\web\wiredcontact\Portal\GeneralEmail.html uses the following <#dbparams tag to override the default behavior:

      <#dbsparams savefunction=subentity>
      <#dbsparams savepage="Portal\GeneralEmail.html">

      Additionally, <#closenow off> is used to disable the automatic dialog closing function, as this template is meant to be used without opening a new dialog.

  • LostPassword.html - example portal template to use for customer lost password requests. Additional tags for the LostPassword subfunction of the portal/lead function include:
    • <#lostpassword tag - parameters include:
      • EmailField=[field name] - the name of the field that contains the email address for the customer record.
      • Page=[file path] - file to use as the landing page for the LostPassword function - typically the same template.
      • Success=[text message] - message to display when LostPassword function is successful.
      • Failure=[text message] - message to display when the email address was not found in the database.
    • <#showonsuccess>
      [Text/Formatted HTML Message]
      </#showonsuccess>

      Section to show when the lost password function succeeds.
    • <#suppressonsuccess>
      [Text/Formatted HTML Message]
      </#suppressonsuccess>

      Section to hide when the lost password function succeeds.

Add Feedback