When the customer clicks the Click to Call link or button, a unique token ID is generated and stored using the clickToConnectSave function. This token, which is stored in the _atg_call_token variable in the ATGCallToken rule, is used to identify the information that the customer was viewing. The ATGCallToken rule then passes the token to Webcare.

Once the call is initiated, Commerce Service Center requests the call token from Webcare using the caller ID and looks up the customer information in the atg/clicktoconnect/Click to CallRepository. The end user information that was stored with the tolkenID is then presented to the agent. The token is created by the page instrumentation filter, and is then passed to Webcare using the ATGCallToken rule.

Creating the ATGCallTokenRule

When you create the ATGCallToken rule, modify the following fields. Other fields can remain at their default. For additional information on the fields, refer to the Webcare embedded assistance.

  1. Log into Webcare. From the Setup menu, select Rule Builder.

  2. Click the Add a New Rule link. Use the Name field to create the name of the rule. Enter ATGCallToken.

  3. The Applies To field should be set to Both Customers and Agents using the pull down menu.

  4. Enable the rule by clicking the Yes radio button in the Enabled field.

  5. Set the Rule Operating Hours to All Hours to ensure that the rule is always run.

  6. Set the Link to Show field to No Link, as this rule will not display a link.

  7. Using the URL Match field, enter a regular expression to indicate to which URL the rule applies. To ensure that the rule applies to all URLs on your site, select the use check box and enter .* in the text field.

  8. The ATGCallToken rule is a VarFieldMatch Rule Type. Select VarFieldMatch from the drop down menu.

    The VarFieldMatch rule checks every two seconds to verify that the field name you specify in the Argument 1 field matches the regular expression entered in the Argument 2 field and is stored in the variable identified in Argument 3.

  9. Click the Show Advanced Feature button to display the arguments that are required when using the VarFieldMatch rule type. In the Argument 1 field, enter the name of the JavaScript variable to verify. Enter the JavaScript variable _atg_call_token.

  10. The Argument 2 field sets the expected value returned by the JavaScript variable. Use the \s* regular-expression to indicate that the _atg_call_tokenThe Argument 4 field sets the variable name in which the value is stored. Set the variable field to 1, indicating that the value returned in Argument 2 is stored in var1.

  11. Save the rule.