How To

Using the GETCONTEXTVALUE Function in Business Rules

GETCONTEXTVALUE returns one of several pieces of information about a running export task, such as the name of the site. This function takes one parameter which determines what information is returned; the possible parameters are listed below.

 

Prerequisites


You should be familiar with the following topics:

 

Context Values Supported for Business Rules


View the table below for Context Values supported for Business Rules.

Parameter Description Example Value
CULTURENAME The locale for the account in the format "en-US"GETCONTEXTVALUE("CULTURENAME")en-US
CURRENTEXPORTCOUNT The number of items that have been exported so far.GETCONTEXTVALUE("CURRENTEXPORTCOUNT")1971
CURRENTERRORCOUNT

This is the number of items that have that were not accepted.

GETCONTEXTVALUE("CURRENTERRORCOUNT")11
CURRENCYCODE

The three character currency code for the current account. To get a different currency code, use GETCURRENCYCODE

GETCONTEXTVALUE("CURRENCYCODE")USD
CUSTOMERNAME The customer account name.GETCONTEXTVALUE("CUSTOMERNAME")Bob's Bargain Barn
CUSTOMERCODE

Usually the same as customername.

GETCONTEXTVALUE("CUSTOMERCODE")Bob's Bargain Barn
PROFILEID

The ChannelAdvisor Complete profile id for the account

GETCONTEXTVALUE("PROFILEID")12345678
SITECODE

This is the provider name with special characters taken out. This is useful for writing rules that output something different depending on the site.

GETCONTEXTVALUE("SITECODE")GoogleBase
TESTMODE

Identifies if it is a real feed

GETCONTEXTVALUE("TESTMODE")True

GETCONTEXTVALUE returns one of several pieces of information about a running export task, such as the name of the site. This function takes one parameter which determines what information is returned; the possible parameters are listed below.

 

Prerequisites


You should be familiar with the following topics:

 

Context Values Supported for Business Rules


View the table below for Context Values supported for Business Rules.

Parameter Description Example Value
CULTURENAME The locale for the account in the format "en-US"GETCONTEXTVALUE("CULTURENAME")en-US
CURRENTEXPORTCOUNT The number of items that have been exported so far.GETCONTEXTVALUE("CURRENTEXPORTCOUNT")1971
CURRENTERRORCOUNT

This is the number of items that have that were not accepted.

GETCONTEXTVALUE("CURRENTERRORCOUNT")11
CURRENCYCODE

The three character currency code for the current account. To get a different currency code, use GETCURRENCYCODE

GETCONTEXTVALUE("CURRENCYCODE")USD
CUSTOMERNAME The customer account name.GETCONTEXTVALUE("CUSTOMERNAME")Bob's Bargain Barn
CUSTOMERCODE

Usually the same as customername.

GETCONTEXTVALUE("CUSTOMERCODE")Bob's Bargain Barn
PROFILEID

The ChannelAdvisor Complete profile id for the account

GETCONTEXTVALUE("PROFILEID")12345678
SITECODE

This is the provider name with special characters taken out. This is useful for writing rules that output something different depending on the site.

GETCONTEXTVALUE("SITECODE")GoogleBase
TESTMODE

Identifies if it is a real feed

GETCONTEXTVALUE("TESTMODE")True
0
Your rating: None
0
Your rating: None