C4C integration

Integrating the forms builder with C4C
Form integration and customer matching

The forms builder integrates with back end systems such as C4C, AIS and payments. Emails can also be sent to business departments and customers with form content and any attachments.

This guide focuses on integration with C4C, as the current integration points with AIS and payments are for specific forms. When integrated with C4C, every form submitted creates a C4C ticket, based on the parameters entered by the content author. C4C matches forms to existing customers or creates new ones.  

1. If a customer is signed into their Hantsweb account, the ticket will be associated with their C4C record

2. If a customer is not signed into their Hantsweb account, C4C matching will be done based on information from the following fields:

Surname
Email address
Address

3.As a minimum, the form needs to contain either a name (first name and surname) and address details combination or an email address

Submit Action Parameters

The submit action parameter defines what happens once the form is submitted by the user. To create a ticket in C4C you need to select the SubmitAction ‘CreateC4CTicket’ in the form properties. If you want the form to send emails as well as creating a C4C ticket, then the submit action is ‘CreateTicketHantsweb’.

 

You can then set the parameters to be passed to C4C:

 

Form submission parameters

 1. To create C4C ticket, the content author can add any of the following ticket parameters to a form:

1. Subject = “Form title”
2. Service category = based on C4C codes
3. Reason category= based on C4C codes
4. Status=New/Referred to relevant department (to be written as LifeCycleStatusCode=Z1/Z4)
If a ticket is new then it would be in the Hantsdirect queue. If a ticket is referred to relevant department that means the ticket will still be created in C4C, it will not be actioned by Hantsdirect. It will be autoclosed.
5. BackOffice = YES/NO (upper case)
If BackOffice=YES, this means that the contents of the form will be sent to the appropriate back office email that has been entered

 
These parameters will be added in the ‘Submit action parameters’ field of the form in the following format:
ticketSubject=“Test”, serviceCategory=“AS”, reasonCategory=“AS-HW”, BackOffice=“Yes”

The parameters will be based on an updated list of C4C codes, and appear on the C4C ticket. The name of the parameters also need to match the C4C API. For example, to capture the service category, the field key has to be 'serviceCategory'. The parameters of a form determine the workflow of the form once it has been submitted.

2. It is possible to overwrite the submit action parameters on the form. This is useful for forms which have workflows that depend on options the user selects. For example, the form may create a different service category than the one in submit action parameters, based on an option selected by the user. To do this, hidden fields need to be used.

A hidden field can be added (Insert>hidden field) containing one C4C parameter (e.g. service category), and can be made conditional on a particular form option. If this option is selected on the form, then the contents of the hidden field will overwrite the original form parameters in ‘Submit action parameters’  (i.e. if a hidden field conditional on Option A contains a different service category to the one in the form parameters, if Option A is selected, the C4C ticket created will contain the service category in the hidden field).

3. To add a parameter to a hidden field, the FieldKey must be the name of the parameter (e.g. BackOffice) and the default value must be the value of the parameter (e.g. NO)

4. Only one parameter can be passed through per hidden field. If a particular option selected by the user contains has more than one parameter that differs from the initial submit action parameters (e.g. it creates both a different service and reason category), then two hidden fields will need to be created for the respective parameters. An option on the form can have as many hidden fields as necessary parameters, so that when it is selected, the C4C ticket created on the form will match the parameters set on the hidden values.


Parameters for hidden fields can include:


Ticket subject
Service category
Reason category
Status
Send to back office
Email addresses

5. The email sent to the business email address will contain the form contents as a HTML attachment and also any attachments the user has uploaded in the form

6. The email messages should contain the C4C ticket ID which was displayed to the customer. This can be done by adding {ticketID} in the rich text editor of the success message.

7. If ‘BackOffice'=“No”’, then no email will be sent and the C4C ticket created will sit in a queue based on its parameters

Note: The C4C codes (service and reason category are in process of being finalised (27/04/2017)). Once finalised, they will be updated and inputted into the style guide. The common parameters which are used for form submission will also be added, once they are finalised. These will be based on the updated C4C API.  

Sending an email copy of the enquiry

If a form needs to send emails through C4C, it needs to be a C4C template form. When creating a form, instead of inserting a normal ‘Form’, you must insert a ‘C4C form template’. 

It is also possible to change the template of a form after creating it. To do this, go to Configure> Change template. Insert a C4C template (which will be found in Sitecore Form Factory>Custom templates> C4C form)

Once the form is a C4C form template, click on the form name to access the C4C ticket details.

It is possible to select the following actions:

1. Send the C4C email to customer
This is a checkbox presented on the C4C ticket details tab. Tick this box in order to send the contents of the form back to the customer. In order for this, the customer email address will need to be included in the form, and the key of that field will need to match that of the C4C API.

2. Add the email subject
The subject of the email message must be the same as the ticket subject set in the parameters

3. C4C back office emails
Multiple back office emails can be entered as comma separated values

4. Change the email body for the C4C back office email body via a rich text editor
The email messages can contain a token {ticketID} which will insert the C4C ticket ID created on form submission into the email

5. Change the email body for C4C front office via a rich text editor

6. C4C Content form attachment
The HTML of the attachment content can be edited in a rich text editor as a rich text field in Sitecore

Other integration points
The forms builder has been built to integrate with AIS and payments as well. These are specific integration points custom built for individual forms so have not been included in this style guide. More generic integration points can be built in future, and existing ones can also be amended. If a form is changed significantly, the corresponding API may also need to be changed.