LogoLogo
WebsiteGuide & TutorialBlogBook a Demo
2.0.0
2.0.0
  • Getting Started
  • Widget
    • Overview
    • Installation
    • Customization
      • Settings
        • Greeting
        • Greeting Introduction
        • Conversation button
        • Conversation list title
        • Launcher Text
        • Widget Appearance
      • Methods
        • Widget visibility
        • Widget window state
        • Set Customer Info
        • Get Customer info
      • Events/Callbacks
        • reloadUI
        • onChatMaximize
        • onChatMinimize
        • onChatInitiated/Started
        • onChatClosed
        • onAgentAssign
        • onAgentStateChange (Available/Unavailable)
      • Link resources
        • Share channel link
  • SDK
    • [Under Development] Overview
    • [Under Development] iOS
      • [Under Development] iOS Setup Guide
        • [Under Development] Getting Started
        • [Under Development] Integration Guide (Core)
        • [Under Development] Integration Guide (Lite)
      • [Under Development] Initialization
      • [Under Development] Theme Setting
      • [Under Development] Acquire Delegates for iOS
      • [Under Development] Widget customization
      • [Under Development] React Native
    • [Under Development] Android
      • [Under Development] Android Setup Guide
        • [Under Development] Getting Started
        • [Under Development] Integration Guide (Core)
        • [Under Development] Integration Guide (Lite)
      • [Under Development] Acquire SDK APIs
      • [Under Development] Acquire Delegates for Android
      • [Under Development] React Native
  • Webhooks
    • Introduction
    • Getting Started
    • Securing Webhook
    • Webhook Events
  • REST APIs
    • Introduction
      • Request Types, Permissions, Errors, & Limits
    • Authorization
    • Conversation
      • Cases
        • Messages
          • Retrieve a list of messages
          • Retrieve a message
          • Send a message
          • Update message
          • Delete Message
        • Case List
        • Single Case
        • Create
        • Close Case
        • Reopen Case
        • Invite Agent
      • Snooze
        • [Under Construction] Delete Snooze
        • Create Snooze
      • Notes
        • List all notes
        • Retrieve a note
        • Create
        • Add note message
        • Delete note
        • Retrieve note messages
    • Contact
      • List all contacts
      • Retrieve a contact
      • Add contact
      • Block Contact
      • Merge contact
      • Update contact
      • Delete contact
    • Company
      • List all companies
      • Retrieve a company
      • Add company
      • Update company
      • Delete company
    • Phone
      • Call in queue
      • Ringing
      • Answered
      • Call end
    • Chatbot
      • Conversational Bot
        • Groups
          • Get Default Group
          • List
          • Add
          • Delete
          • Copy
        • Question And Answer
          • List
          • Get
          • Add
          • Update
          • Delete
          • Publish
          • Bulk Action
          • Push QnA To Suggestions
          • Import QnA
      • Sequence Bot
        • Sequence List
        • Get Single Sequence
        • Add
        • Update
        • Delete
        • Bulk Action
        • Copy Existing Sequence
        • Branch
          • Get Single Branch
          • Add
          • Update
          • Delete
          • Set as Parent Branch
      • Bot resources
      • Webhooks in chatbot
    • Analytics
      • Custom Reporting
      • General Analytics
      • Chat
        • Overview
        • Tags
        • Visitor Information
          • Visitor Analytics
          • Visitor Source Overview
        • Video Analytics
      • Cobrowse
      • Chatbot
        • Sequence Bot
        • Conversational Bot
      • Knowledge Base
      • Email
      • VoIP - Call SMS
      • Agent Performance
    • [Under Construction] Custom Cards
      • Timeline-cards
        • Create Interaction Card
        • Update Interaction Card
        • List all Cards
        • Retrieve a card
        • Delete card
      • Exclusive cards
        • Create general card
        • Create app card - from other system
        • Delete card
    • Knowledge Base
      • Groups
        • Add
        • Update
        • Get
        • Get Single
        • Delete
      • Articles
        • Add Article
        • Update Article
        • Delete Article
        • Get Articles
        • Get Single Article
      • Category
        • Add Category
        • Update Category
        • Delete Category
        • Get Category
    • Settings
      • Account Settings
        • Users
          • List
          • Get Single
          • Add
          • Update
          • Delete
        • Roles
          • List
          • Get Single Role
          • Add
          • Update
          • Delete
        • Departments
          • List
          • Get
          • Add
          • Update
          • Delete
        • Custom Attributes
          • List of custom attributes
          • Get a custom Attribute
          • Add a custom attribute
          • Update a custom attribute
          • Delete a custom attribute
      • Conversation Settings
        • Shortcuts
          • List Groups
          • Get
          • Add
          • Update
          • Delete
        • Tags
          • List All Tags
          • Get Single Tag
          • Add New Tag
          • Update Tag
          • Delete Tag
        • Feedback
          • List of all feedback
          • Get single feedback
          • Add feedback
          • Update Feedback
          • Delete feedback
      • Security
        • Block Visitor
          • List
          • Get
          • Add
          • Delete
        • Audit Logs
          • Audit Log
          • Audit Log Users
Powered by GitBook
On this page
  • Initialize AcquireSupport SDK
  • startSession
  • User APIs
  • Methods
  1. SDK
  2. [Under Development] iOS

[Under Development] Initialization

Previous[Under Development] Integration Guide (Lite)Next[Under Development] Theme Setting

Last updated 3 years ago

Our SDK is currently under review. Check back later for updates.

Initialize AcquireSupport SDK

Step 1: Get your Acquire Account ID

You can find your accountID as shown in image below :

Get Acquire Account ID

Step 2: Verify your users

Make sure your users are who they claim to be with identity verification. Enforce identity verification to prevent other from pretend to be (third party) for entertainment or fraud logged-in users. Generate an HMAC with SHA256 whenever a user logs into your app. Most web frameworks will have a method or library to help you do this.

You'll need your app’s secret key and the email of the currently logged-in user.

Secret Key

For example, in Ruby on Rails we can generate our HMAC using a method called OpenSSL::HMAC.hexdigest, where the first parameter is the name of a hash function (we use SHA256), the second is YOUR_SECRET_KEY, and the third is your USER_EMAIL.

Keep your secret key safe! Never commit it directly to your repository, client-side code, or anywhere a third party can find it.

To set up identity verification, you'll need to generate an HMAC on your server for each logged-in user and set in acquireIOSupport SDK.

setVisitorIdentityFields

To set visitor identity for SDK, use setVisitorIdentityFields which takes identity parameters such as “email” and its value as an argument.

AcquireIO.support.setVisitorIdentityFields(["email":"xyz@abc.com"])

Parameter

Type

Description

fields

[String: Any]

identified parameter as key and its value

setVisitorIdentityFields() must be called before setAccount: takes place and must pass same email as passed in setVisitorDetails().

startSession

You must call this method to start a session with Acquire server. After calling startSession(), the AcquireIODelegate the delegate will receive either didChangeConnectionStatus: or onError:

AcquireIO.support.startSession()

setAccount: should be called first before calling above method

Step 3: Setup Account

To setup an account, call below method.

AcquireIO.support.setAccount("your_acquire_account_id", domain: "optional_testing_domain_url", withOptions: config)

Parameter

Type

Description

ACCOUNT_ID

String

your account id from acquire dashboard from Step 1

domain

String (Optional)

your testing domain url. (If not provided, default domain is Acquire Live Domain)

configOptions

[String : Any]

showSupport

Calling this method will start a connection session with acquire server. After calling showSupport(), the AcquireIODelegate delegate will receive either didChangeConnectionStatus: or onError:

AcquireIO.support.showSupport(<viewcontroller_instance>)

Parameter

Type

Description

viewController

UIViewController

instance of viewcontroller on which support button should be displayed

setAccount: should be called first before calling above method

loadAcquireIOSupportFonts

To load SDK's default Fonts, following method must be called before setAccount:

UIFont.loadAcquireIOSupportFonts

User APIs

To customize visitor’s identification, you can call following sdk method to set the name, phone, email and fields of the app visitor. This is part of additional visitor configuration.

Set Visitor Details

Use this method before initialization of sdk otherwise it wont work.

func setVisitorDetails(_ data: [String: Any])

Parameter

Type

Description

data

[String: Any]

details of contact fields e.g.["name":"abc","phone":"xxxxxxxx","email":"abc@gmail.com"]

Pass nil values for both name and email to clear out old existing values.

If this is provided through the api, user will not be prompted to re-enter this information again.

Update Visitor Details

Use this method after initialization of sdk otherwise it wont work.

func updateVisitorDetails(_ data: [String: Any])

Parameter

Type

Description

data

[String: Any]

details of contact fields parameters. e.g.["name":"abc","phone":"xxxxxxxx","email":"abc@gmail.com"]

Pass nil values for both name and email to clear out old existing values.

If this is provided through the api, user will not be prompted to re-enter this information again.

Logout visitor

If you have set visitor hash (HMAC digest) and visitor just logged out from account and need to manage user integrity with agent, call method logoutVisitor() to remove all acquire data from your app related to visitorHash. To logout from AcquireIOSupport, calling below method is mandatary:

AcquireIO.support.logoutVisitor()

Methods

getVisitorId

To fetch visitorID after acquire session Connected. Returns string

let visitorID = AcquireIO.support.getVisitorID()

getAvailableAgentCount

To fetch total number of available agents. Returns Int.

let agentsAvailableCount = AcquireIO.support.getAvailableAgentCount()

getOnlineAgentIDs

To fetch agentIDs of online agents. Returns [NSNumber].

let agentsIDs = AcquireIO.support.getOnlineAgentIDs()

dismissChatSupport

This optional method will dismiss the support view from the screen.

AcquireIO.support.dismissChatSupport()
User Authentication

config options. For more details on config options

Click here