Difference between revisions of "OutcomeSetItem class"
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|Name=<nowiki>OutcomeSetItem</nowiki> | |Name=<nowiki>OutcomeSetItem</nowiki> | ||
|Description=<nowiki>Outcome set item.</nowiki> | |Description=<nowiki>Outcome set item.</nowiki> | ||
− | |Methods= | + | |InheritsFrom=object|Methods= |
− | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} |
|Properties= | |Properties= | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>AsteriskCode</nowiki>|HasGetter=1|Description=<nowiki>Get which asterisk code will map to this outcome if any.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>AsteriskCode</nowiki>|HasGetter=1|Description=<nowiki>Get which asterisk code will map to this outcome if any.</nowiki>}} | ||
Line 21: | Line 21: | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Priority</nowiki>|HasGetter=1|Description=<nowiki>Get new priority after save.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Priority</nowiki>|HasGetter=1|Description=<nowiki>Get new priority after save.</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ProtectDuration</nowiki>|HasGetter=1|Description=<nowiki>Get number of days the qas user cannot be sampled.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ProtectDuration</nowiki>|HasGetter=1|Description=<nowiki>Get number of days the qas user cannot be sampled.</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} | ||
+ | |||
=== <span style="color:#DF8621">'''Examples'''</span> === | === <span style="color:#DF8621">'''Examples'''</span> === | ||
<source lang="javascript"> | <source lang="javascript"> | ||
Line 31: | Line 32: | ||
{ | { | ||
OutcomeSetItem item = items[i]; | OutcomeSetItem item = items[i]; | ||
− | + | number itemStatus = item.ContactStatus;// see status more at function GetCatiOutcomeStatus | |
+ | string itemName = item.Name.GetTranslationForLoggedInUser(); | ||
+ | print(convertToString (itemStatus)+": " + itemName); | ||
} | } | ||
+ | |||
/* | /* | ||
− | Connection reached | + | 1: Connection reached |
− | Appointment - sure | + | 3: Appointment - sure |
− | Call again later (appointment) | + | 3: Call again later (appointment) |
− | Answering machine | + | 2: Answering machine |
− | Busy | + | 4: Busy |
− | No answer | + | 4: No answer |
− | Wrong number | + | 2: Wrong number |
... | ... | ||
− | Invalid number | + | 2: Invalid number |
*/ | */ | ||
</source> | </source> |
Latest revision as of 06:17, 2 July 2020
OutcomeSetItem
Outcome set item.
Parent class
Inherits from object
Methods
- (From object) string ToString() - The string representation of the object.
Properties
- string AsteriskCode { get; } - Get which asterisk code will map to this outcome if any.
- bool AutoNext { get; } - Get if the dialer can automatically dial next number after this outcome.
- int ContactStatus { get; } - Get type of outcome. See Cati_ContactStatus_xxx.
- int ContactStatusIndex { get; } - Get order of item in the set. Lower is earlier.
- int DaysBlacklisted { get; } - Get number of days to blacklist phonenumber after, and permanently disable qas user.
- bool DedicatedToInterviewer { get; } - Get if next time use same interviewer to call.
- bool DedicatedToOthers { get; } - Get if interviewer can choose who to dedicate next call to.
- int Delay { get; } - Get number of minutes to delay until retrying qas.
- LocalizedString Description { get; } - Get description of the outcome.
- int Id { get; } - Get id of the outcome.
- int MaxAllowedDuration { get; } - Get maximum number of seconds a call of this outcome should take.
- LocalizedString Name { get; } - Get name of the outcome.
- string ObjectTypeName { get; } - The name of the type of object.
- bool OutOfQuota { get; } - Get if qas is marked as out of quota.
- int Priority { get; } - Get new priority after save.
- int ProtectDuration { get; } - Get number of days the qas user cannot be sampled.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
number qnaireRid = 15639974;
CatiSettings settings = new CatiSettings(qnaireRid);
array items = settings.OutcomeSet.Items;
for(number i = 0; i<items.Count ; i++)
{
OutcomeSetItem item = items[i];
number itemStatus = item.ContactStatus;// see status more at function GetCatiOutcomeStatus
string itemName = item.Name.GetTranslationForLoggedInUser();
print(convertToString (itemStatus)+": " + itemName);
}
/*
1: Connection reached
3: Appointment - sure
3: Call again later (appointment)
2: Answering machine
4: Busy
4: No answer
2: Wrong number
...
2: Invalid number
*/