Submitting on behalf of a customer
When an administrator completes an XForm, the submission will be recorded against the administrator's account. However, when the internal form is being submitted on behalf of a customer, e.g. during a customer service telephone call, it is sometimes desirable to record the submission against the customer account. This has a couple of advantages:
- The customer will be able to view the submission made on their behalf when they log in to their account
- The customer's details can be used to prefill questions in the form
Using this functionality
It is possible to assign an internal form to a customer by adding a parameter to the end of the URL when starting the form. The URL of an internal form usually looks like this:
To assign the form to a customer, add either
userEmail to the URL:
https://www.mysite.co.uk/jadu/xforms2/internal?formID=163&userFormID=-1&userID=1 https://www.mysite.co.uk/jadu/xforms2/internal?formID=163&userFormID=-1&userEmail=test%2Euser%40jadu%2Eco%2Euk https://www.mysite.co.uk/jadu/xforms2/internal?formID=163&userFormID=-1&externalUserID=100
Note that, the userID, externalUserID or userEmail value must match a registered customer. If passing an email address, this must be URL encoded, as above. If all are passed,
userID takes precedence, then
You will know if a submission is on behalf of a customer, as the ribbon will show this at the top of each page of the internal form.
Once the form is submitted, the details of both the customer and administrator will be visible when the corresponding Received Form is viewed.
Internal only questions
Public questions are visible on both internal and front-end forms. When an administrator completes an internal form on a customer's behalf, they will complete both public and internal questions, but the customer will only see the public questions when viewing the submission in their account.
All Question/Answersvariables to use in email alerts and complete pages. These variables list all public questions on the form. When using these variables, it is possible to include internal only questions. The variables should not be configured to show internal only questions for anything the customer may see e.g. email receipts.
Care should also be taken not to use 'Admin - Username', 'Admin - Email' or response variables to internal only questions, as this may also show information to customers that they should not see. It is advisable to test any form where this feature will be used thoroughly before using it in production, including checking what the customer can see in their account.
When an internal form is started on behalf of a customer, it will not appear in the customer's account page until it is submitted by an administrator. This is to prevent to people making the same submission, and is one of the security changes required in XFP's front-end scripts.