Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are 9 types of in-app messages:

Pop-up - Image, Header, Text & Button

Mini - Icon & Text

Full Screen-image

Image Modified

Image Modified

Image Modified

Full Screen-image&button

Pop-up - Image, Header, Text & Button

Pop-up-Survey

Image Modified

Image Modified

Image Modified

Pop-up - NPS with Text & Button

Native Alert & Action Sheet

NPS with Number

Image Modified

Image Modified

Image Modified

NPS & Second Popup

Image Modified

If you want to manage the links you add for in-app messages yourself, you can follow the step below.

...

After form is created at RMC panel, likewise in-app message, existence of spin to win is controlled by after each customEvent call. It is shown as follows;

Spin to Win Full

Spin to Win Half

Image ModifiedImage Modified

Scratch to Win

After form is created at RMC panel, likewise in-app message, existence of Scratch to Win is controlled by after each customEvent call. It is shown as follows;

...

Code Block
languageswift
public class VisilabsRecommendationResponse {
    public var products: [VisilabsProduct]
    public var error: VisilabsError?
    public var widgetTitle: String = ""
    
    internal init(products: [VisilabsProduct], widgetTitle: String = "", error: VisilabsError? = nil) {
        self.products = products
        self.widgetTitle = widgetTitle
        self.error = error
    }
}

VisilabsProduct class has the following properties:

Property

Type

code

String

title

String

img

String

dest_url

String

brand

String

price

Double

dprice

Double

cur

String

dcur

String

freeshipping

Bool

samedayshipping

Bool

rating

Int

comment

Int

discount

Double

attr1

String

attr2

String

attr3

String

attr4

String

attr5

String

If recommended products exist for given arguments in completion method you need to handle the array of products.

Code Block
languageswift
Visilabs.callAPI().recommend(zoneID: "6", productCode: "pc", filters: []){ response in
    if let error = response.error {
        print(error)
    }else{
        print("Recommended Products")
        for product in response.products{
            print("product code: \(product.code) title: \(product.title)")
        }
    }
}

You may also pass an array of filters to recommend method. For example the following implementation returns only the products which contains laptop in the title.

Code Block
languageswift
var filters = [VisilabsRecommendationFilter]()
let filter = VisilabsRecommendationFilter(attribute: .titlePRODUCTNAME, filterType: .like, value: "laptop")
filters.append(filter)
Visilabs.callAPI().recommend(zoneID: "6", productCode: "pc", filters: filters){ response in
    if let error = response.error{
        print(error)
    }else{
        print("Widget Title: \(response.widgetTitle)")
        print("Recommended Products")
        for product in response.products{
            print("product code: \(product.code) title: \(product.title)")
        }
    }
}

Report Recommendation Clicks

To report the clicks of widget recommendations you need to call the trackRecommendationClick method with the qs property of Product object.

Code Block
languageswift
Visilabs.callAPI().trackRecommendationClick(qs: product.qs)