Class: CrmEnv

CrmEnv

Class to define the parameters of the Efficy Enterprise server

new CrmEnv( [env])

Create a Crm Environment. Set null when executed from browser
Parameters:
Name Type Argument Description
env Object <optional>
The definition object of the targeted CRM environment
Properties
Name Type Argument Default Description
url string <optional>
"" The URL of Efficy Enterprise, e.g. https://mycompany.efficy.cloud/. Set null when executed from browser
customer string <optional>
"" The optional customer profile name
logOff boolean <optional>
false if true, logoff the session after the next executeBatch();
apiKey string <optional>
"" The API Key, if user and password are not used
user string <optional>
"" The user credential
pwd string <optional>
"" The password credential
cookies array <optional>
[] Optional cookie setting
Source:
Tutorials:
Example
new CrmEnv({
   "url": "https://mycompany.efficy.cloud/",
   "apiKey": "86E353284C0C4A848F7ADEA13589C8B6"
});

Members


cookieHeader :string

Returns the request header "cookie", e.g. 'EfficySession=3B826396-22AE9698'
Type:
  • string
Source:

isNode :boolean

Returns true if this code runs in node.js
Type:
  • boolean
Source:

sessionId :string

Returns the session ID, e.g. '3B826396-22AE9698'
Type:
  • string
Source:

shortSessionId :string

Returns the first part of the session ID, e.g. '3B826396'
Type:
  • string
Source:

Methods


setEnv(env)

Update the Crm Environment set by the constructor
Parameters:
Name Type Description
env Object The definition object of the targeted CRM environment
Properties
Name Type Argument Default Description
url string <optional>
"" The URL of Efficy Enterprise, e.g. https://mycompany.efficy.cloud/. Leave empty when executed from browser
customer string <optional>
"" The optional customer profile name
logOff boolean <optional>
false if true, logoff the session after the next executeBatch();
apiKey string <optional>
"" The API Key, if user and password are not used
user string <optional>
"" The user credential
pwd string <optional>
"" The password credential
cookies array <optional>
[] Optional cookie setting
Source: