Channels Sales Conversions

Sales conversion are a way of using the Channels database to associate sales data with Chat session data.  This is not the same as Sales Value, which is the shopping cart value. Sales conversion is an out-of-box Channels functionality; however, it requires manual modification of files in the Channels HTTP directory or an ability to implement the JS code for conversions that is also in the HTTP directory.  Once the files are modified then the customer's web programmer will need to deploy code into the site checkout process to make the appropriate calls to post conversions to the Channels DB. This feature will be depreciated with use of Moxie Concierge.

The JavaScript method of running conversions opens Server Gate functionality up to the source code of the end user webpage.  It makes the call to Action 4014 directly from the website instead of running the call through Salesconversion.aspx first.

Using SalesConversion.aspx from the Channels HTTP directory is the most commonly implemented method of posting sales conversions to the database.  Using this method applied one more layer of possible failure to the process; however, it also hides the call to Server Gate from the end user browser and allows for the cookie handling to be addressed by standard code.

The first thing that you need to have in place is the Sales Conversion settings found at the bottom of the Customer Client settings in Admin-Chat.

  • "Enable" turns on the Sales Conversion functionality.
  • "Allow multiple conversions" determines if the system will allow more than one sale to be recorded per chat session.  Leaving it uncheck ensures that duplicate sales will not be posted; however, it also restricts them if they are legitimate sales.
  • "Submitting IP Address" can be tricky.  Most often it is either '*' or 127.0.0.1.  If you are using the JavaScript method of posting sales then you will want to use the star.  Otherwise, restricting the IP to the server's IP can help control sales conversions to only be legitimate calls to the SalesConversion.aspx page.
  • "Days before cookie expires" sets the cookie's expiration date as well as sets the duration of time after a chat session that the system will allow a sale to be posted.

After the settings have been configured in Moxie Channels admin, open the Salesconversion.apsx file located in the <Moxie Channels Installation path>\nGenera\NetAgent Server\<Channels Server IP address>\http path.
Navigate to the following code:
server_name = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var server_port = "80";
var server_protocol = "http://";

  • In the ‘server_name’ tag, specify the Fully Qualified Domain Name (FQDN) or IP Address of the server computer on which Moxie Channels is installed.
  • In the ‘var server_port’ tag, specify the port number used to connect to Moxie Channels server. For a secure connection, specify the port number as 443.
  • In the ‘var server_protocol’ tag, specify ‘http://’ or ‘https://’ depending on the type of protocol used to transfer the information.
  • Save and close the file.

NOTE: Ensure the settings made in the Salesconversion.apsx file is also present in the salesconversion_sample.html file.

As most companies use the SalesConversion.aspx method of posting sales, here is a rundown of the lifecycle of a sale. Note that this may be incomplete depending on specific configuration:

Conversion Sales Communication Lifecycle

End User Browser: Agent Sales Cookie is delivered to the browser during the chat session
End User Browser: Custom CS code is delivered to browser during checkout process
End User Browser: Custom CS code calls ConversionSales.aspx with Currency, Amount, Varable1 and Variable2 arguments and passes domain cookies to the NetAgent server.

CS ASPX: Parses out SessionID and SessionGUID from AgentSales cookie
CS ASPX: If AgentSales cookie does not exist, sends HTTP 302 redirect back to End User Browser and ends process
CS ASPX: If AgentSales cookie does exist, Calls SrvGate.dll Action 4014 with SessionID, SessionGUID, Currency, Amount, Variable1 and Variable2 arguments

SrvGate.dll 4014: Calls NAServer Service

NAServer Service: Calls DB, requests SessionID, SessionGUID, CS Enabled, CS Multiple Allowed, CS IP, CS Number of Days

DB: Returns SessionID, SessionGUID, CS Enabled, CS Multiple Allowed, CS IP, CS Number of Days to NAServer Service

NAServer Service: Verifies ConversionSales is Enabled
NAServer Service: Verifies SessionID exists
NAServer Service: Verifies SessionGUID matches SessionGUID from associated session
NAServer Service: Verifies conversion is within CS Number of Days
NASer ver Service: Verifies sale count vs. CS Multiple Allowed
NAServer Service: If conditions are satisfied, sends INSERT statement to DB

DB: Confirms INSERT

NAServer Service: If DB INSERT was successful, sends TRUE XML response to SrvGate.dll
NAServer Service: If DB INSERT was not successful, sends FALSE XML response to SrvGate.dll

SrvGate.dll: Relays XML response to CS ASPX

CS ASPX: Relays XML response to End User Browser

End Of Life