Difference between revisions of "ATC/Current/SDK/Method reference"

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 72: Line 72:
 
|alignment=Vertical
 
|alignment=Vertical
 
|gif=No
 
|gif=No
|structuredtext={{{!}} border="1"
+
|structuredtext={{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
!{{!}}Name
+
{{!}}{{!}}'''Name'''
!{{!}}Description
+
{{!}}{{!}}'''Description'''
 
{{!}}-
 
{{!}}-
{{!}}{{!}}<tt>ac('api.visit.get', callback)</tt>
+
{{!}}{{!}}ac('api.visit.get', callback)<br />
{{!}}{{!}}Performs an AJAX request to retrieve the session data from the<@@@TPL171654@@@>server. The object returned contains the most up-to-date data for the session. This is useful for monitoring live data, such as segment assigned IDs, outcome score progress, and last page viewed.
+
{{!}}{{!}}Performs an AJAX request to retrieve the session data from the {{MINTYDOCSPRODUCT}} server. The object returned contains the most up-to-date data for the session. This is useful for monitoring live data, such as segment assigned IDs, outcome score progress, and last page viewed.<br />
 
{{!}}-
 
{{!}}-
{{!}}{{!}}<tt>ac('api.visit.cached', callback)</tt>
+
{{!}}{{!}}ac('api.visit.cached', callback)<br />
{{!}}{{!}}Retrieves the cached<@@@TPL171654@@@>session data from the browser local storage. If session data does not exist in local storage, a session will be requested via an AJAX request from<@@@TPL171654@@@>. This is practical for retrieving data that doesn't change for a session, such as the visit identifier, device details, location, referrer, and marketing campaign information.
+
{{!}}{{!}}Retrieves the cached {{MINTYDOCSPRODUCT}} session data from the browser local storage. If session data does not exist in local storage, a session will be requested via an AJAX request from {{MINTYDOCSPRODUCT}}. This is practical for retrieving data that doesn't change for a session, such as the visit identifier, device details, location, referrer, and marketing campaign information.<br />
 
{{!}}-
 
{{!}}-
{{!}}{{!}}<tt>ac('api.visit.getShortId', callback)</tt>
+
{{!}}{{!}}ac('api.visit.getShortId', callback)<br />
{{!}}{{!}}This provides the same functionality as<tt>'api.visit.cached'</tt>, but only the 'shortId' is returned. The short ID is useful as a legible reference number that can be displayed on the website.
+
{{!}}{{!}}This provides the same functionality as<tt>'api.visit.cached'</tt>, but only the 'shortId' is returned. The short ID is useful as a legible reference number that can be displayed on the website.<br />
 
{{!}}}
 
{{!}}}
 
|fullwidth=No
 
|fullwidth=No
Line 92: Line 92:
 
|alignment=Vertical
 
|alignment=Vertical
 
|gif=No
 
|gif=No
|structuredtext={{{!}} border="1"
+
|structuredtext={{{!}} class="wikitable" style="font-size: 14px;"
 
{{!}}-
 
{{!}}-
!{{!}}Name
+
{{!}}{{!}}'''Name'''
!{{!}}Description
+
{{!}}{{!}}'''Description'''
 
{{!}}-
 
{{!}}-
{{!}}{{!}}<tt>ac('api.customer.get', callback)</tt>
+
{{!}}{{!}}ac('api.customer.get', callback)<br />
{{!}}{{!}}This performs an AJAX request to retrieve the visitor data from the<@@@TPL199248@@@>server.
+
{{!}}{{!}}This performs an AJAX request to retrieve the visitor data from the {{MINTYDOCSPRODUCT}} server.<br />
 
{{!}}}
 
{{!}}}
 
|fullwidth=No
 
|fullwidth=No
 
}}
 
}}
 
}}
 
}}

Revision as of 17:12, March 27, 2019

This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.

View a list of all methods for Genesys Predictive Engagement.

Initialization methods

For complete information about a method, including signature and arguments, click the method's name.

Method Description
init Initializes the Genesys Predictive Engagement SDK
destroy Stops all Genesys Predictive Engagement SDK activity and removes all tracking information

Tracking methods

Utility methods

For complete information about a method, click the method's name.

Method Description

serialize

Used for passing serialized data from a form.
dom - ready
Allows you specify a function handler to run when the DOM has fully loaded.
debug
Sends helpful messages to the console.

Visit API methods

Name Description
ac('api.visit.get', callback)
Performs an AJAX request to retrieve the session data from the Genesys Predictive Engagement server. The object returned contains the most up-to-date data for the session. This is useful for monitoring live data, such as segment assigned IDs, outcome score progress, and last page viewed.
ac('api.visit.cached', callback)
Retrieves the cached Genesys Predictive Engagement session data from the browser local storage. If session data does not exist in local storage, a session will be requested via an AJAX request from Genesys Predictive Engagement. This is practical for retrieving data that doesn't change for a session, such as the visit identifier, device details, location, referrer, and marketing campaign information.
ac('api.visit.getShortId', callback)
This provides the same functionality as'api.visit.cached', but only the 'shortId' is returned. The short ID is useful as a legible reference number that can be displayed on the website.

Customer API methods

Name Description
ac('api.customer.get', callback)
This performs an AJAX request to retrieve the visitor data from the Genesys Predictive Engagement server.
Retrieved from "https://all.docs.genesys.com/ATC/Current/SDK/Method_reference (2025-06-23 17:53:50)"
Comments or questions about this documentation? Contact us for support!