setAudienceLevel

setAudienceLevel メソッドは、setAudience コマンドおよび startSession コマンドのオーディエンス・レベルを定義します。

setAudienceLevel(audienceLevel)
  • audienceLevel: オーディエンス・レベルを含む文字列。

    重要: audienceLevel の名前は、Campaign で定義されているオーディエンス・レベルの名前と正確に一致する必要があります。大/小文字の区別があります。

戻り値

なし。

次の例は、startSession および setAudience を呼び出している executeBatch メソッドの抜粋です。

String audienceLevel="Customer";
. . .
Command startSessionCommand = new CommandImpl();
startSessionCommand.setAudienceID(initialAudienceId);
. . .
Command setAudienceCommand = new CommandImpl();
setAudienceCommand.setAudienceLevel(audienceLevel);
. . .
/** Build command array */
Command[] commands = 
    { 
        startSessionCommand,
        setAudienceCommand,
    };
/** Make the call */
    BatchResponse batchResponse = api.executeBatch(sessionId, commands);
        
/** Process the response appropriately */
    processExecuteBatchResponse(batchResponse);