To add a scripted extension point for Connect Support chats, implement ConversationServerInteractionService as an admin. Open its definition in Scripted Extension Points, create an implementation, and write a custom Script Include that uses pre-chat survey context to select a Connect Support queue. Save it with Update, then verify registration and routing.
Define the routing decision before creating the implementation
A script on this extension point reads the answers a requester gives in the pre-chat survey shown in Agent Chat, so the routing decision can rest on what the requester actually said. The context variables hold those responses. The implementation uses those context variables to direct a conversation to an appropriate Connect Support queue. Start with a specific routing decision: which survey answer should influence the destination, and what should happen when that answer cannot support a decision?
Write a short routing specification before opening the form. For each relevant answer, record the intended queue and the reason that queue should receive the conversation. Treat this as your implementation plan, rather than as an assumed platform mapping. It gives the developer and the support team a shared way to judge whether the script does the right thing.
- Identify the survey inputs the routing decision actually needs.
- Record the values expected from those inputs, including unanswered questions.
- Agree on a destination for each supported combination.
- Choose a deliberate handling approach for unexpected or incomplete context.
Keep the scope narrow enough to test. A routing rule based on one clearly understood answer is easier to assess than a script that combines unrelated survey fields without an agreed precedence. If several answers influence the outcome, decide which condition takes priority before writing the branches.
For the surrounding conversation flow, review live agent handoff, chat queues, and surveys. That helps keep the survey-to-queue requirement connected to the handoff the requester experiences.
Create the ConversationServerInteractionService implementation for Connect Support routing
The role required for this procedure is admin. Use that role for creating the ConversationServerInteractionService implementation. Check the labels and available definition on your instance and release before making changes; the procedure below centers on the named extension point and its implementation relationship.
Start at All > System Extension Points > Scripted Extension Points. Open the ConversationServerInteractionService definition and confirm that is the record on screen before going further. Its Create implementation related link generates the custom Script Include. On that Script Include form, write the branches that read the pre-chat context variables and choose the Connect Support queue named in your specification. Click Update to save the implementation.
Begin from the extension point definition so the implementation is associated with the intended extension point. Once saved, the Script Include is linked to ConversationServerInteractionService, so the review that follows has to check that link as well as the code inside the script. Merely seeing a Script Include with a recognizable name is usually not enough to show the relationship is correct.
Check the registration first, against the definition you opened. Then check the saved branches against the routing specification. A correct association does not show that an unanswered question reaches the right queue, and one successful chat does not show that every branch works.
Build the script around the actual pre-chat context
Use the context variables supplied by the pre-chat survey presented to the requester in Agent Chat. That survey is completed before the chat reaches an agent. It is separate from the post-chat survey configured on the Chat Survey form, and the routing script does not read that one. Before coding a condition, establish the actual variable name and the value received in the conversation you are testing. A question’s visible wording is a requirement clue, but your implementation review should verify the context it produces.
Do not start with a generic code sample and assume its parameter names fit your survey. Inspect the implementation structure available in your environment and develop against that structure. Keep the routing conditions readable enough that another administrator can trace an input through the script to the selected destination.
For example, your design might distinguish requests concerning access from requests concerning equipment. Those are illustrative business categories, not predefined survey variables or queue names. In your implementation plan, replace them with the real answers and destination queues used by your support operation.
Make incomplete context an explicit design case. Decide how your script should handle a missing answer, an answer outside the planned set, and two answers that imply competing destinations. These are test requirements for your custom logic; do not assume a particular automatic fallback will satisfy your support policy.
Avoid letting unrelated survey answers influence routing merely because they are available. Limiting the decision to the inputs it needs makes later changes easier to review. When a question changes, you can identify the affected condition and its tests without reinterpreting the entire conversation setup.
If the starting channel is part of the investigation, use Virtual Agent chat modes and channels to frame that separate requirement before changing routing logic.
Verify registration and the saved routing logic
Registration creates an extension instance record linking a scripted extension point definition with its implementation in a custom Script Include. This relationship is a separate thing to inspect from the content of the script. A saved script answers what logic exists; its registration answers which definition that implementation belongs to.
Compare the saved logic with your routing specification. Check that the inputs used in each branch correspond to the survey context you intended to consume, and that the destinations match the support team’s decisions.
Use a short review record with three parts: the selected extension point, the custom Script Include, and the expected input-to-queue outcomes. This is a suggested review method, not an additional platform form. It makes the configuration understandable to someone who did not create it.
For help planning this work, see ServiceNow implementation.
Test complete conversations and diagnose routing failures
Exercise the implementation through the requester journey that presents the pre-chat survey. For each test, record the submitted answers, the context used by the routing decision, the expected queue, and the observed destination. Use test data suitable for your environment and keep unnecessary personal information out of the review record.
Start with one supported answer combination and follow the conversation through to its destination. Then cover the remaining branches. Include incomplete answers and unexpected values from your routing specification, rather than stopping after a successful example. Where conditions overlap, test the agreed precedence directly.
- If the wrong branch is selected, compare the incoming value with the condition the script evaluates.
- If the expected branch is selected but the destination is wrong, compare that branch’s queue choice with the routing specification.
- If the custom logic appears disconnected from the flow, inspect its registration against ConversationServerInteractionService.
- If the survey context differs between journeys, reproduce the particular requester entry point before editing the script.
These checks organize troubleshooting without assuming an undocumented error message or control. Change one suspected cause at a time and repeat the affected test. Keep a known successful case alongside the failing case so a correction to one branch does not hide a regression elsewhere.
For entry-point questions, review chat widget embedding and greeting setup. Keep widget presentation decisions distinct in your test notes so they do not become unexplained changes to the routing requirement.
Retain the outcome record with the change so later reviews can distinguish a revised business rule from an accidental behavior change. Describe the reason for each expected destination, especially where the survey answer could reasonably belong to more than one support team.
Questions about maintaining the custom implementation
What should a handover to another administrator contain?
Include the routing rationale, the survey inputs the script depends on, the chosen destinations, and the test outcomes. Explain unusual branch precedence in ordinary language. This lets the next administrator understand the intent before deciding whether a later request requires a code change.
How should a proposed survey change be reviewed?
Compare the proposal with the implementation’s input assumptions. Identify whether it changes an answer value, removes information used by a condition, or introduces a new routing requirement. Assign corresponding test cases before accepting the survey and script changes together.
When is a routing request too broad for this change?
Split the work when stakeholders cannot agree on the destination rules or when the request also changes the conversation journey. Resolve those decisions explicitly. A larger script rarely resolves disagreement about who owns incoming support conversations.
What evidence helps approve a later script revision?
Keep the previous expected outcomes and add the new cases that motivated the revision. Review which branches changed and why. The approval record should show both the requested improvement and the continued behavior of unaffected routing decisions.