Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-liveagent

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-liveagent

Salesforce's live agent chat integration for Ember.js applications.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

ember-liveagent

Actions Status Ember Observer Score Maintainability Test Coverage dependencies Status devDependencies Status

Salesforce's live agent chat integration for Ember.js applications.

Compatibility

  • Ember.js v4.12 or above
  • Embroider or ember-auto-import v2

Installation

ember install ember-liveagent

Usage

1. You'll need to configure your liveagent chat.

// config/environment.js
module.exports = function (environment) {
  let ENV = {
    'ember-liveagent': {
      salesforceURL: '[SALESFORCE_URL]',
      communityURL: '[COMMUNITY_URL]',
      org: '[ORG]',
      snapinName: '[SNAPIN_NAME]',
      baseLiveAgentContentURL: '[BASE_LIVEAGENT_CONTENT_URL]',
      deploymentId: '[DEPLOYMENT_ID]',
      buttonId: '[BUTTON_ID]',
      baseLiveAgentURL: '[BASE_LIVEAGENT_URL]',
      eswLiveAgentDevName: '[ESW_LIVEAGENT_DEV_NAME]',
    },
  };

  return ENV;
};

See the service for how the parameters are passed into embedded_svc's init method.

2. You can then inject the liveagent service provided by this addon to call the boot method which accepts optional parameters.

// app/routes/application.js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import config from '../config/environment'; // import the configuration

export default class ApplicationRoute extends Route {
  @service liveagent;

  afterModel() {
    const liveagentConfig = config['ember-liveagent'];

    this.liveagent.boot({
      ...liveAgentConfig,
      settings: {
        displayHelpButton: true, // default value: false
        isOfflineSupportEnabled: true, // default value: false
        language: 'cs', // default value: 'en'
        defaultMinimizedText: 'Ask guru', // default value: 'Chat with an Expert'
        loadingText: 'Just wait a second', // default value: 'Loading'
        prepopulatedPrechatFields: { Email: 'example@example.com' }, // default value: {}
        offlineSupportMinimizedText: 'You can contact us', // default value: 'Contact Us'
      },
    });
  }
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 22 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc