InitChat
Mon 01 January 2018Syntax
InitChat(logical queue ID, application data URL, customer username, [chat_subject][, chat_question][, wizard_URL][, priority][, skill_level][, cost])
Description
Use the InitChat function to engage a customer and an agent in a chat session. It places a chat request on a MultiChannel Framework queue and immediately launches a customer chat window. When an agent accepts this task from the queue, the system launches an agent chat window.
Note: Chats are implicitly queued with the current language setting of the initiator (%Language_user). Chats are only assigned to agents who have this language in their language list as specified on the Languages page of the Agents component.
Parameters
Field or Control |
Definition |
---|---|
logical queue ID |
Specifies the logical queue in which the task should be queued. It is a string value. The logical queue ID is a case-sensitive value. The case used in the InitChat function must exactly match the case used when creating the logical queue ID on the Queues page. |
application data relative URL |
This is the relative URL of the application page you want the agent to see on the left side of the agent-to-customer chat window when the agent accepts the chat. This value needs to be provided by your program. Note: This URL parameter must not point to content that includes JavaScript that breaks surrounding frames or that references the "top" window. In addition, the application page should not contain URL links to such content. This is because the Agent Chat Console is framed by the RenServer API which sends and receives the chat text. |
customer username |
This reflects the name of the customer or end user initiating the chat request. This value can be derived from the signon mechanism (%UserID) or by prompting the user. This is the name used to identify the chat requestor in the MultiChannel Framework chat console. For example, in the chat history window, all text sent by the customer is prefixed with this name. |
chat_subject |
This is an optional string parameter. The application can indicate a subject of the chat request. This could be prompted from the user or inferred from the page from which the chat is initiated. The system displays the subject on the agent's chat console when it assigns the chat to an agent. |
chat_question |
This is an optional string parameter. The application can indicate a specific question to be addressed in the chat. This could be prompted from the user or inferred from the page from which the chat is initiated. The value appears in the agent's chat window history box immediately after accepting the chat. This enables the agent to know the customer's question without having to ask. |
wizard_URL |
This feature leads the agent to an application page from which the agent can select a URL to push to the customer. This is an optional string parameter. This is the relative URL of the application page you wish the agent to launch when the agent clicks the Grab button on the Agent Chat console. If you do not provide this value, a default wizard is launched with no application-specific functionality. If you do provide this value, the application page must provide a wizard for pushing a URL to the customer. The wizard page provided by the application must be able to write the URL generated by the wizard to the URL field. The URL field is defined by PeopleSoft. In addition, you need to embed the HTML definition, MCF_GRABURL, which provides the Push and Push and Close buttons that push the URL in the URL field to the customer. See the Example section for examples showing the PeopleCode that would be used to generate the relative URL that is passed in to InitChat and the PeopleCode that would be used to embed the provided MCF_GRABURL definition into your application page. |
priority |
This is an optional parameter. It is an integer value expressing the priority level of the request. The minimum value is 0 and there is no maximum value. Specify the priority of this chat task. A higher value means a higher priority. MultiChannel Framework tasks are ordered on a physical queue based on their assigned priority, which means the system assigns a task of a higher priority before it assigns a task of a lower priority. If no value is specified, the system uses the default value specified for that task type on the Task Configuration page. When tasks have the same priority, the system orders the tasks according to time they were created. For example, suppose the following tasks exist: Priority 2 created at 11:15 AM and Priority 2 created at 11:16 AM. In this case, the system places the task created at 11:15 AM before the task created at 11:16 AM. |
skill level |
This is an optional parameter. It is an integer value expressing the minimum skill level required of the agent to whom the system routes the request. You set an agent's skill level in the Agent page. The minimum value is 0 and there is no maximum value. The queue server assigns this task type to an available agent on that queue with the lowest skill level greater than or equal to the skill level required by the task. If no value is specified, the system uses the default value specified for that task type in the Task Configuration page. |
cost |
This is an optional parameter. It is an integer value measuring the workload each task places on an agent. The cost of a task is an estimate of the tasks's expected complexity and of the time required to resolve the task. The minimum value is 0, and there is no maximum value. The cost of a task is added to an agent's workload after accepting a task on the MultiChannel Framework console. A task can't be assigned to an agent if the difference between the current workload and the maximum workload defined for that agent on the Agent configuration page is less than the cost of this task. If you do not specify a value, the system uses the default value specified for that task in the Task Configuration pages. Note: If the required skill level or cost submitted exceeds the highest skill level or maximum workload of any of the agents on that queue, the task cannot be assigned. |
Returns
Returns a unique Chat ID in the form of an integer. You can use this ID to reference the chat in the chat log.
If unsuccessful, it returns a message number. The message set ID for MultiChannel Framework is 162.
For example, 1302 is returned when an invalid task type or no value is provided.