Query from Seller Extensions

  • Simple Query against the Seller Extension Table.

  • Provide table from .tables() in .source().

Code

api to get sellerId

Groovy
def sellerId = ...

qapi.tables().sellerExtensionRows()

Groovy
def qapi = api.queryApi()

def t1 = qapi.tables().sellerExtensionRows("SellerQuota")

def sellerId = ... // Api to get sellerId

return qapi.source(t1, [t1.sellerId().as("SellerID"),
                        t1.SalesGoalIncrease.as("Sales Goal Increase %"),
                        t1.Rule1QuotaAmount.as("Rule1 - Quota Amount "),
                        t1.Rule1CompensationPct.as("Rule1 - Compensation %"),
                        t1.Rule2QuotaPct.as("Rule2 - Quota %"),
                        t1.Rule2CompensationPct.as("Rule2 - Compensation % ")],
                        t1.sellerId().equal(sellerId))
        .stream { it.collect { it } }

Result

SellerID

Sales Goal Increase %

Rule1 - Quota Amount 

Rule1 - Compensation %

Rule2 - Quota %

Rule2 - Compensation % 

Angelina Phillipi

0.2

200000

0.01

0.15

0.02

See Also