---
sourceDocument: Référence de l’API Xanadu
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/fr-FR/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - fr-FR

ft:publication_title :

    - Référence de l’API Xanadu

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyAction - Global

# NotifyAction - Global {#ariaid-title1}

* Rversion finale: Xanadu
* 
* Mis à jour 1 août 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 22 minutes de lecture

L'API NotifyAction vous permet de définir des actions à envoyer à un fournisseur de téléphonie.

Vous ajoutez des actions à un objet NotifyAction en appelant la fonction add respective pour chaque type d'action. Chaque fonction add renvoie un objet Action, tel qu'un objet SayAction pour la méthode addSay(). Reportez-vous à chaque exemple de méthode pour plus d'informations sur les objets retournés.  
Remarque :  
L'API NotifyAction n'est valide que dans le cadre d'applications globales. Pour utiliser ce type de fonctionnalité dans les applications incluses dans le périmètre, vous devez créer des activités de workflow de Notification personnalisées. Pour plus d'informations sur la création de ces activités, consultez [Activités du workflow de Notification](https://www.servicenow.com/docs/access?context=c_NotifyActivities&version=xanadu&pubname=xanadu-servicenow-platform&ft:locale=en-US).

## NotifyAction : addConference() {#ariaid-title2}

Ajoute une action de conférence pour déplacer l'appel en cours vers la téléconférence en cours.
{#r_NotifyAction-addConference__table_ef5_xg4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 1. Paramètres]

{#r_NotifyAction-addConference__table_ef5_xg4_wr} {#r_NotifyAction-addConference__table_ff5_xg4_wr__entry__2}

| Type | Description |
|-|-|
| Action de conférence | Action ajoutée à l'objet NotifyAction. Utilisez l'objet ConferenceAction pour définir le nom de la téléconférence et le comportement de la téléconférence quand un participant rejoint ou quitte la téléconférence. |
[Tableau 2. Renvoie]

{#r_NotifyAction-addConference__table_ff5_xg4_wr}  
Cet exemple montre comment ajouter une action de conférence et définir le nom de la conférence.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set its name
    var conference = notifyAction.addConference();
    conference.setName('Brown Bag: Week 3');

## NotifyAction : addConference.setEndOnExit(booléen endOnExit) {#ariaid-title3}

Définit si la téléconférence doit se terminer lorsqu'un appelant spécifié quitte la téléconférence.
{#NotifyAction-addConference_setEndOnExit_B__table_j33_tmc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| endOnExit | Booléen | Marqueur indiquant si la téléconférence doit se terminer lorsque l'appelant spécifié quitte la téléconférence en cours. * Vrai : mettre fin à la téléconférence lorsque l'appelant spécifié quitte la téléconférence * false : valeur par défaut. Terminer la téléconférence une fois que tous les participants ont quitté {#NotifyAction-addConference_setEndOnExit_B__ul_bcw_4fc_cgb} |
[Tableau 3. Paramètres]

{#NotifyAction-addConference_setEndOnExit_B__table_j33_tmc_cgb} {#NotifyAction-addConference_setEndOnExit_B__table_k33_tmc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 4. Renvoie]

{#NotifyAction-addConference_setEndOnExit_B__table_k33_tmc_cgb}  
Cet exemple montre comment ajouter une action de téléconférence, puis la configurer de façon à ce que la téléconférence se termine lorsque l'appelant spécifié quitte.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the caller that starts the meeting
    var conference = notifyAction.addConference();

    // retrieve the participant for which the conference call should exit when they leave
    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setEndOnExit(true);
    }

## NotifyAction : addConference.setHangupOnStar(booléen hangupOnStar) {#ariaid-title4}

Définit si la téléconférence doit se terminer lorsqu'un participant appuie sur la touche étoile (\*).
{#NotifyAction-addConference_setHangupOnStar_B__table_kjb_jkc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| raccrocherOnStar | Booléen | Marqueur indiquant si la téléconférence doit se terminer lorsqu'un participant appuie sur la touche étoile (\*). Valeurs valides : * vrai : terminer la téléconférence * false : valeur par défaut. Ne pas mettre fin à la téléconférence {#NotifyAction-addConference_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[Tableau 5. Paramètres]

{#NotifyAction-addConference_setHangupOnStar_B__table_kjb_jkc_cgb} {#NotifyAction-addConference_setHangupOnStar_B__table_ljb_jkc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 6. Renvoie]

{#NotifyAction-addConference_setHangupOnStar_B__table_ljb_jkc_cgb}  
Cet exemple montre comment ajouter une action de conférence, puis enregistrer la téléconférence.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the hang up action
    var conference = notifyAction.addConference();
    conference.setHangupOnStar(true);

## NotifyAction : addConference.setMuted(booléen en sourdine) {#ariaid-title5}

Définit si le micro de l'appelant spécifié doit être désactivé pendant la téléconférence en cours.
Si vous n'appelez pas cette méthode, le son de l'appelant n'est pas désactivé par défaut.
{#NotifyAction-addConference_setMuted_B__table_zws_qgc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| assourdi | Booléen | Marqueur indiquant si le micro de l'appelant spécifié doit être désactivé pendant la téléconférence en cours. * Vrai : le son de l'appelant doit être coupé * false : valeur par défaut. Le son de l'appelant ne doit pas être coupé {#NotifyAction-addConference_setMuted_B__ul_bcw_4fc_cgb} |
[Tableau 7. Paramètres]

{#NotifyAction-addConference_setMuted_B__table_zws_qgc_cgb} {#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 8. Renvoie]

{#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb}  
Cet exemple montre comment ajouter une action de conférence, puis couper le son d'un appelant spécifié.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set it to mute the specified participant
    var conference = notifyAction.addConference();

    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setMuted(true);
    }

## NotifyAction : addConference.setName(nom de chaîne) {#ariaid-title6}

Définit le nom de la téléconférence actuelle sur le nom spécifié.
{#NotifyAction-addConference_setName_S__table_okj_rcc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| nom | Chaîne | Nom à associer à la téléconférence actuelle. |
[Tableau 9. Paramètres]

{#NotifyAction-addConference_setName_S__table_okj_rcc_cgb} {#NotifyAction-addConference_setName_S__table_pkj_rcc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 10. Renvoie]

{#NotifyAction-addConference_setName_S__table_pkj_rcc_cgb}  
Cet exemple montre comment ajouter une action de conférence et définir le nom de la téléconférence.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set its name
    var conference = notifyAction.addConference();

    conference.setName('Brown Bag: Week 3');

## NotifyAction : addConference.setRecord(enregistrement booléen) {#ariaid-title7}

Définit si la téléconférence associée doit être enregistrée.
Si vous n'appelez pas cette méthode, la téléconférence n'est pas enregistrée par défaut.
{#NotifyAction-addConference_setRecord_B__table_bz2_ffc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| enregistrement | Booléen | Marqueur indiquant si la téléconférence en cours doit être enregistrée. * Vrai : démarrer l'enregistrement de la téléconférence * false : valeur par défaut. La téléconférence n'est pas enregistrée. L'enregistrement est arrêté s'il est en cours d'enregistrement. {#NotifyAction-addConference_setRecord_B__ul_bcw_4fc_cgb} |
[Tableau 11. Paramètres]

{#NotifyAction-addConference_setRecord_B__table_bz2_ffc_cgb} {#NotifyAction-addConference_setRecord_B__table_cz2_ffc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 12. Renvoie]

{#NotifyAction-addConference_setRecord_B__table_cz2_ffc_cgb}  
Cet exemple montre comment ajouter une action de conférence, puis enregistrer la téléconférence.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set it to be recorded
    var conference = notifyAction.addConference();
    conference.setRecord(true);

## NotifyAction : addConference.setStartOnEnter(booléen startOnEnter) {#ariaid-title8}

Définit si la téléconférence doit commencer lorsque l'appelant spécifié rejoint la téléconférence.
Par défaut, chaque fois qu'il y a deux appelants ou plus, la téléconférence démarre. Pour que la téléconférence ne commence que lorsqu'un appelant spécifique rejoint, vous devez appeler cette méthode pour chacun des autres appelants et définir la valeur sur \<\< faux \>\>. En faisant cela, la téléconférence ne commencera pas tant que la personne souhaitée n'aura pas rejoint la téléconférence.
{#NotifyAction-addConference_setStartOnEnter_B__table_dps_43c_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| startOnEnter | Booléen | Marqueur indiquant si la téléconférence doit commencer lorsque l'appelant sélectionné rejoint la téléconférence actuelle. * true : valeur par défaut. Démarrez la téléconférence lorsque l'appelant spécifié rejoint la téléconférence. * faux : démarrer la téléconférence une fois qu'elle est ajoutée {#NotifyAction-addConference_setStartOnEnter_B__ul_bcw_4fc_cgb} |
[Tableau 13. Paramètres]

{#NotifyAction-addConference_setStartOnEnter_B__table_dps_43c_cgb} {#NotifyAction-addConference_setStartOnEnter_B__table_eps_43c_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 14. Renvoie]

{#NotifyAction-addConference_setStartOnEnter_B__table_eps_43c_cgb}  
Cet exemple montre comment ajouter une action de conférence, puis la configurer de manière à ce que la téléconférence ne démarre pas tant que l'appelant spécifié ne la rejoint pas.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the caller that starts the meeting
    var conference = notifyAction.addConference();

    // retrieve the participant for which the conference call should start when they arrive
    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setStartOnEnter(true);
    }

## NotifyAction : addDial() {#ariaid-title9}

Transfère un appel à un numéro de téléphone spécifié ou Notifier le client.
Une fois l'action addDial créée, le numéro de téléphone associé (setPhoneNumber()) ou le client de notification (setClientRecord()) doit également être défini.
{#r_NotifyAction-addDial__table_ef5_xg4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 15. Paramètres]

{#r_NotifyAction-addDial__table_ef5_xg4_wr} {#r_NotifyAction-addDial__table_ff5_xg4_wr__entry__2}

| Type | Description |
|-|-|
| DialAction | Action ajoutée à l'objet NotifyAction. |
[Tableau 16. Renvoie]

{#r_NotifyAction-addDial__table_ff5_xg4_wr}  
Cet exemple montre comment passer un appel sortant et enregistrer l'appel.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Invoke setRecord(Boolean record) to record the call to this new number +919765xxxxxxx
    dialAction.setRecord(true);

## NotifyAction : addDial.setCallerID(String callerID) {#ariaid-title10}

Définit l'ID de l'appelant pour l'appel sortant.
{#NotifyAction-addDial_setCallerID_S__table_ehj_hzc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| ID de l'appelant | Chaîne | Identificateur de l'appelant à définir pour l'appel sortant. |
[Tableau 17. Paramètres]

{#NotifyAction-addDial_setCallerID_S__table_ehj_hzc_cgb} {#NotifyAction-addDial_setCallerID_S__table_fhj_hzc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 18. Renvoie]

{#NotifyAction-addDial_setCallerID_S__table_fhj_hzc_cgb}  
Cet exemple montre comment passer un appel sortant et définir un délai d'expiration d'appel.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Set the caller ID
    dialAction.setCallerID('Planning Conf Call');

## NotifyAction : addDial.setClientRecord(String tableName, String sysID) {#ariaid-title11}

Définit l'appelant actuel en appelant Notification en spécifiant la table dans laquelle rechercher l'enregistrement de l'appelant Notification et l'identificateur unique de l'appelant.
{#NotifyAction-addDial_setClientRecord_S_S__table_mmn_zbd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| tableName | Chaîne | Nom de la table qui contient les informations sur l'appelant souhaité. |
| sysID | Chaîne | Identificateur unique (sys_id) de l'appelant Notification souhaité. |
[Tableau 19. Paramètres]

{#NotifyAction-addDial_setClientRecord_S_S__table_mmn_zbd_cgb} {#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 20. Renvoie]

{#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb}  
Cet exemple montre comment définir l'appelant actuel en appelant Notification à l'aide de setClientRecord().

    // set up a dial action to forward the
    // call to the specified client
    var action = new SNC.NotifyAction();
    var dial = action.addDial();
    dial.setClientRecord(notifyClientRecord.getTableName(), notifyClientRecord.getUniqueValue());
    dial.setTimeout(activity.vars.timeout);
    dial.setRecord(activity.vars.record);

## NotifyAction : addDial.setDTMF(valeur de chaîne) {#ariaid-title12}

Définit les tonalités DTMF à jouer lorsque l'appel se connecte.
{#NotifyAction-addDial_setDTMF_S__table_ult_2fd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| valide | Chaîne | Chiffres DTMF valides à lire lorsque l'appel se connecte. |
[Tableau 21. Paramètres]

{#NotifyAction-addDial_setDTMF_S__table_ult_2fd_cgb} {#NotifyAction-addDial_setDTMF_S__table_vlt_2fd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 22. Renvoie]

{#NotifyAction-addDial_setDTMF_S__table_vlt_2fd_cgb}  
Cet exemple montre comment effectuer un appel sortant et définit les tonalités DTMF à émettre lorsque l'appel se connecte.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party - this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // DTMF tones to play when call connects
    dialAction.setDTMF("1246AF");

## NotifyAction : addDial.setHangupOnStar(booléen hangupOnStar) {#ariaid-title13}

Définit si l'appel doit se terminer lorsque la touche étoile (\*) est enfoncée.
{#NotifyAction-addDial_setHangupOnStar_B__table_uns_2gd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| raccrocherOnStar | Booléen | Marqueur indiquant si l'appel doit se terminer lorsque la touche étoile (\*) est enfoncée. * vrai : mettre fin à l'appel * Faux : ne pas mettre fin à l'appel {#NotifyAction-addDial_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[Tableau 23. Paramètres]

{#NotifyAction-addDial_setHangupOnStar_B__table_uns_2gd_cgb} {#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 24. Renvoie]

{#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb}  
Cet exemple montre comment passer un appel sortant et définir la touche de suspension en étoile.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // End call by pressing star
    dialAction.setHangupOnStar(true);

## NotifyAction : addDial.setPhoneNumber(String phoneNumber) {#ariaid-title14}

Définit le numéro de téléphone à appeler.
{#NotifyAction-addDial_setPhoneNumber_S__table_cdc_f1d_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| phoneNumber | Chaîne | Numéro de téléphone conforme à la norme E.164 à appeler. |
[Tableau 25. Paramètres]

{#NotifyAction-addDial_setPhoneNumber_S__table_cdc_f1d_cgb} {#NotifyAction-addDial_setPhoneNumber_S__table_ddc_f1d_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 26. Renvoie]

{#NotifyAction-addDial_setPhoneNumber_S__table_ddc_f1d_cgb}  
Cet exemple montre comment passer un appel sortant et définir un délai d'expiration d'appel.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');

## NotifyAction : addDial.setRecord(enregistrement booléen) {#ariaid-title15}

Définit si l'appel sortant doit être enregistré.
{#NotifyAction-addDial_setRecord_B__table_hbp_sdd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| enregistrement |   | Marqueur indiquant si l'appel sortant doit être enregistré. Valeurs valides : * vrai : enregistre l'appel sortant * faux : n'enregistre pas l'appel sortant {#NotifyAction-addDial_setRecord_B__ul_z5r_22d_cgb} |
[Tableau 27. Paramètres]

{#NotifyAction-addDial_setRecord_B__table_hbp_sdd_cgb} {#NotifyAction-addDial_setRecord_B__table_ibp_sdd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 28. Renvoie]

{#NotifyAction-addDial_setRecord_B__table_ibp_sdd_cgb}  
Cet exemple montre comment passer un appel sortant et enregistrer l'appel.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Record the call
    dialAction.setRecord(true);

## NotifyAction : addDial.setTimeout(délai d'expiration de nombre entier) {#ariaid-title16}

Définit le nombre de secondes après lesquelles l'appel sortant expire.
{#NotifyAction-addDial_setTimeout_I__table_ldb_hyc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| timeout | Entier | Nombre de secondes après lesquelles l'appel sortant expire. Par défaut : 30 |
[Tableau 29. Paramètres]

{#NotifyAction-addDial_setTimeout_I__table_ldb_hyc_cgb} {#NotifyAction-addDial_setTimeout_I__table_mdb_hyc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 30. Renvoie]

{#NotifyAction-addDial_setTimeout_I__table_mdb_hyc_cgb}  
Cet exemple montre comment passer un appel sortant et définir un délai d'expiration d'appel.

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Set the number of seconds to wait before timing out
    dialAction.setTimeout(45);

## NotifyAction : addGather() {#ariaid-title17}

Présente un menu téléphonique interactif spécifié à l'appelant.
{#r_NotifyAction-addGather__table_crt_zg4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 31. Paramètres]

{#r_NotifyAction-addGather__table_crt_zg4_wr} {#r_NotifyAction-addGather__table_drt_zg4_wr__entry__2}

| Type | Description |
|-|-|
| GatherAction (en anglais seulement) | Action ajoutée à l'objet NotifyAction. Utilisez l'objet GatherAction pour définir les paramètres et les options du menu à présenter à l'utilisateur. |
[Tableau 32. Renvoie]

{#r_NotifyAction-addGather__table_drt_zg4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(1);    // the user can type 1 digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digit
    gather.setTimeout(10);          // time to enter answer, in seconds

    // add first menu item
    var usSay = gather.addSay();
    usSay.setText('Press 1 for english');
    usSay.setLanguage('en-US');

    // add second menu item
    var nlSay = gather.addSay();
    nlSay.setText('Kies 2 voor Nederlands');
    nlSay.setLanguage('nl-NL');

    // add third menu item
    var frSay = gather.addSay();
    frSay.setText('Choisissez 3 pour le français.');
    frSay.setLanguage('fr-FR');

    // and finish off with an applause
    var play = gather.addPlay();
    play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');

## NotifyAction : addGather.addPlay() {#ariaid-title18}

Lit un fichier audio pendant l'appel.
Reportez-vous à la méthode NotifyAction addPlay() pour obtenir une description des méthodes enfants prises en charge.
{#NotifyAction-addGather_addPlay__table_uhd_mpd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 33. Paramètres]

{#NotifyAction-addGather_addPlay__table_uhd_mpd_cgb} {#NotifyAction-addGather_addPlay__table_vhd_mpd_cgb__entry__2}

| Type | Description |
|-|-|
| PlayAction (en anglais) | Action ajoutée à l'objet NotifyAction. Utilisez l'objet PlayAction pour définir l'URL du fichier audio et le nombre de fois que l'audio doit être mis en boucle. |
[Tableau 34. Renvoie]

{#NotifyAction-addGather_addPlay__table_vhd_mpd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // Create the gather action object
    var gather = notifyAction.addGather();

    // Play an audio file
    var play = gather.addPlay();
    play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');

## NotifyAction : addGather.addSay() {#ariaid-title19}

Définit la synthèse vocale à lire lors de l'appel.
Reportez-vous à la méthode NotifyAction addSay() pour obtenir une description des méthodes enfants prises en charge.
{#NotifyAction-addGather_addSay__table_cp4_znd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 35. Paramètres]

{#NotifyAction-addGather_addSay__table_cp4_znd_cgb} {#NotifyAction-addGather_addSay__table_dp4_znd_cgb__entry__2}

| Type | Description |
|-|-|
| SayAction (en anglais seulement) | Action ajoutée à l'objet NotifyAction. Utilisez l'objet SayAction pour définir le texte et la langue à lire. |
[Tableau 36. Renvoie]

{#NotifyAction-addGather_addSay__table_dp4_znd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(1);    // the user can type 1 digit
    gather.setTimeout(20);          // time to enter answer, in seconds

    // add first menu item
    var gatherSay = gather.addSay();
    gatherSay.setText('Press 1 for english');
    gatherSay.setLanguage('en-US');

## NotifyAction : addGather.setFinishKey(String finishKey) {#ariaid-title20}

Définit la clé saisie par l'appelant pour indiquer la fin de son entrée.
{#NotifyAction-addGather_setFinishKey_S__table_pk1_hmd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| finishKey | Chaîne | Clé qui indique la fin de l'entrée de l'appelant. Valeurs valides : * 0-9 * # (par défaut) * \* {#NotifyAction-addGather_setFinishKey_S__ul_vv3_vhd_cgb} |
[Tableau 37. Paramètres]

{#NotifyAction-addGather_setFinishKey_S__table_pk1_hmd_cgb} {#NotifyAction-addGather_setFinishKey_S__table_qk1_hmd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 38. Renvoie]

{#NotifyAction-addGather_setFinishKey_S__table_qk1_hmd_cgb}  
Cet exemple montre comment ajouter une action de collecte et définir la clé qui indique la fin de l'entrée de l'appelant.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type four digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digit

## NotifyAction : addGather.setNumberOfDigits(nombre entier de chiffres) {#ariaid-title21}

Définit le nombre de chiffres à collecter.
{#NotifyAction-addGather_setNumberOfDigits_I__table_f2w_3ld_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Nombre de chiffres | Entier | Nombre de chiffres à collecter. Zéro n'est pas une valeur valide. |
[Tableau 39. Paramètres]

{#NotifyAction-addGather_setNumberOfDigits_I__table_f2w_3ld_cgb} {#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 40. Renvoie]

{#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb}  
Cet exemple montre comment ajouter une action de collecte et définir le nombre de frappes clavier à collecter.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type four digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digits
    gather.setTimeout(20);          // time to enter answer, in seconds

## NotifyAction : addGather.setTimeout(délai d'expiration de l'entier) {#ariaid-title22}

Définit le délai après lequel la collecte des entrées expire.
{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| timeout | Entier | Nombre de secondes pendant lesquelles attendre l'entrée de l'appelant avant d'expirer. Par défaut : 10 |
[Tableau 41. Paramètres]

{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb} {#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 42. Renvoie]

{#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb}  
Cet exemple montre comment ajouter une action de collecte et définir la valeur du délai d'expiration de l'entrée.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type 1 digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digits
    gather.setTimeout(20);          // time to enter answer, in seconds

## NotifyAction : addHangUp() {#ariaid-title23}

Met fin à un appel téléphonique actif.
{#r_NotifyAction-addHangUp__table_tqt_lh4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 43. Paramètres]

{#r_NotifyAction-addHangUp__table_tqt_lh4_wr} {#r_NotifyAction-addHangUp__table_uqt_lh4_wr__entry__2}

| Type | Description |
|-|-|
| Raccrocher | Action ajoutée à l'objet NotifyAction. |
[Tableau 44. Renvoie]

{#r_NotifyAction-addHangUp__table_uqt_lh4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // hang up
    notifyAction.addHangUp();

## NotifyAction : addQueue() {#ariaid-title24}

Met l'appel en file d'attente, ce qui le met en attente.
{#r_NotifyAction-addQueue__table_e5b_j24_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 45. Paramètres]

{#r_NotifyAction-addQueue__table_e5b_j24_wr} {#r_NotifyAction-addQueue__table_f5b_j24_wr__entry__2}

| Type | Description |
|-|-|
| Action de file d'attente | Action ajoutée à l'objet NotifyAction. Utilisez l'objet QueueAction pour définir le nom de la file d'attente et le comportement de mise en file d'attente ou de retrait de la file d'attente. |
[Tableau 46. Renvoie]

{#r_NotifyAction-addQueue__table_f5b_j24_wr}  
Cet exemple montre comment ajouter l'appel à la file d'attente spécifiée.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

Cet exemple montre comment supprimer l'appel de la file d'attente.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

## NotifyAction : addQueue.setDequeue(booléen dequeue) {#ariaid-title25}

Supprime l'appel de la file d'attente d'appels actuelle (le retire de la \<\< mise en attente \>\>).
{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Retirer de la file d'attente | Booléen | Marqueur indiquant s'il faut supprimer l'appel actuel de la file d'attente. * vrai : supprimer l'appel de la file d'attente * faux : l'appel est placé dans la file d'attente {#NotifyAction-addQueue_setDequeue_B__ul_lph_gxd_cgb} |
[Tableau 47. Paramètres]

{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb} {#NotifyAction-addQueue_setDequeue_B__table_fnw_wwd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 48. Renvoie]

{#NotifyAction-addQueue_setDequeue_B__table_fnw_wwd_cgb}  
Cet exemple montre comment supprimer l'appel de la file d'attente.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

## NotifyAction : addQueue.setName(nom de chaîne) {#ariaid-title26}

Définit le nom associé à une file d'attente.
{#NotifyAction-addQueue_setName_S__table_fph_xvd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| nom | Chaîne | Nom à associer à la file d'attente. |
[Tableau 49. Paramètres]

{#NotifyAction-addQueue_setName_S__table_fph_xvd_cgb} {#NotifyAction-addQueue_setName_S__table_gph_xvd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 50. Renvoie]

{#NotifyAction-addQueue_setName_S__table_gph_xvd_cgb}  
Cet exemple montre comment définir le nom d'une file d'attente.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

## NotifyAction : addPlay() {#ariaid-title27}

Lit un fichier audio pendant l'appel.
{#r_NotifyAction-addPlay__table_inp_1g4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 51. Paramètres]

{#r_NotifyAction-addPlay__table_inp_1g4_wr} {#r_NotifyAction-addPlay__table_jnp_1g4_wr__entry__2}

| Type | Description |
|-|-|
| PlayAction (en anglais) | Action ajoutée à l'objet NotifyAction. Utilisez l'objet PlayAction pour définir l'URL du fichier audio et le nombre de fois que l'audio doit être mis en boucle. |
[Tableau 52. Renvoie]

{#r_NotifyAction-addPlay__table_jnp_1g4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(1);

## NotifyAction : addPlay.setLoop(boucle entière) {#ariaid-title28}

Définit le nombre de fois qu'il faut lire (boucler) le fichier audio.
{#NotifyAction-addPlay_setLoop_I__table_akq_1rd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| boucle | Entier | Nombre de fois que le fichier audio sera lu. |
[Tableau 53. Paramètres]

{#NotifyAction-addPlay_setLoop_I__table_akq_1rd_cgb} {#NotifyAction-addPlay_setLoop_I__table_bkq_1rd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 54. Renvoie]

{#NotifyAction-addPlay_setLoop_I__table_bkq_1rd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(2);

## NotifyAction : addPlay.setURL(URL de la chaîne) {#ariaid-title29}

Définit l'URL à laquelle obtenir le fichier audio à lire.
{#NotifyAction-addPlay_setURL_S__table_t3n_pqd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| URL | Chaîne | URL du fichier audio à lire. |
[Tableau 55. Paramètres]

{#NotifyAction-addPlay_setURL_S__table_t3n_pqd_cgb} {#NotifyAction-addPlay_setURL_S__table_u3n_pqd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 56. Renvoie]

{#NotifyAction-addPlay_setURL_S__table_u3n_pqd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(1);

## NotifyAction : addRecord() {#ariaid-title30}

Ajoute une action pour enregistrer l'appel à l'objet NotifyAction actuel.
L'enregistrement se termine automatiquement lorsque l'appel est terminé ou lorsqu'une touche de terminaison spécifiée est enfoncée (setFinishKey()). L'enregistrement est ensuite placé dans la table notify_record de l'appel associé.
{#NotifyAction-addRecord__table_dyw_22x_zfb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 57. Paramètres]

{#NotifyAction-addRecord__table_dyw_22x_zfb} {#NotifyAction-addRecord__table_eyw_22x_zfb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 58. Renvoie]

{#NotifyAction-addRecord__table_eyw_22x_zfb}  
Cet exemple montre comment enregistrer un appel.

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addRecord() of NotifyAction -- This returns an object of type RecordAction
    var recordAction = notifyAction.addRecord();
     
    // Optional. Define the key that callers use to stop the recording
    recordAction.setFinishKey('#'); // Stop the call recording when caller presses the '#' key.

## NotifyAction : addRecord.setFinishKey(String finishKey) {#ariaid-title31}

Définit la clé qui met fin à l'enregistrement.
{#NotifyAction-addRecord_setFinishKey_S__table_t1r_fhd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| finishKey | Chaîne | Clé qui met fin à l'enregistrement. Valeurs valides : * 0-9 * # (par défaut) * \* {#NotifyAction-addRecord_setFinishKey_S__ul_vv3_vhd_cgb} |
[Tableau 59. Paramètres]

{#NotifyAction-addRecord_setFinishKey_S__table_t1r_fhd_cgb} {#NotifyAction-addRecord_setFinishKey_S__table_u1r_fhd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 60. Renvoie]

{#NotifyAction-addRecord_setFinishKey_S__table_u1r_fhd_cgb}  
Cet exemple montre comment enregistrer un appel et définir la clé de fin d'appel.

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the key that terminates the recording
    recordAction.setFinishKey('#'); // This means that we stop the call recording when user presses the '#' key.

## NotifyAction : addRecord.setMaxDuration(nombre entier en secondes) {#ariaid-title32}

Définit la durée maximale de l'enregistrement.
{#NotifyAction-addRecord_setMaxDuration_I__table_xv3_cjd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| secondes | Entier | Durée maximale de l'enregistrement en secondes. Par défaut : 3 600 |
[Tableau 61. Paramètres]

{#NotifyAction-addRecord_setMaxDuration_I__table_xv3_cjd_cgb} {#NotifyAction-addRecord_setMaxDuration_I__table_yv3_cjd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 62. Renvoie]

{#NotifyAction-addRecord_setMaxDuration_I__table_yv3_cjd_cgb}  
Cet exemple montre comment enregistrer un appel et définir la clé de fin d'appel.

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the maximum length of the recording
    recordAction.setMaxDuration(4800); 

## NotifyAction : addRecord.setTimeout(délai d'expiration de nombre entier) {#ariaid-title33}

Définit le nombre de secondes de silence, après quoi l'enregistrement se termine.
{#NotifyAction-addrecord_setTimeout_I__table_wnz_f3d_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| timeout | Entier | Nombre de secondes de silence sur l'appel, après quoi l'enregistrement se termine. Par défaut : 10 |
[Tableau 63. Paramètres]

{#NotifyAction-addrecord_setTimeout_I__table_wnz_f3d_cgb} {#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 64. Renvoie]

{#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb}  
Cet exemple montre comment enregistrer un appel et définir la valeur du délai d'expiration de l'enregistrement.

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the recoding timeout value
    recordAction.setTimeout(360); 

## NotifyAction : addReject() {#ariaid-title34}

Rejette un appel entrant.
{#r_NotifyAction-addReject__table_z1j_rh4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 65. Paramètres]

{#r_NotifyAction-addReject__table_z1j_rh4_wr} {#r_NotifyAction-addReject__table_abj_rh4_wr__entry__2}

| Type | Description |
|-|-|
| Action de rejet | Action ajoutée à l'objet NotifyAction. Utilisez l'objet RejectAction pour définir le motif du rejet de l'appel. |
[Tableau 66. Renvoie]

{#r_NotifyAction-addReject__table_abj_rh4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

## NotifyActon : addReject.setReason(motif de la chaîne) {#ariaid-title35}

Définit le motif de rejet de l'appel.
{#NotifyActon-addReject_setReason_S__table_fdf_bzd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| motif | Chaîne | Motif du rejet de l'appel. Valeurs valides : * busy * rejeté {#NotifyActon-addReject_setReason_S__ul_bf1_wpy_cgb}Toutes les autres valeurs sont ignorées. |
[Tableau 67. Paramètres]

{#NotifyActon-addReject_setReason_S__table_fdf_bzd_cgb} {#NotifyActon-addReject_setReason_S__table_gdf_bzd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 68. Renvoie]

{#NotifyActon-addReject_setReason_S__table_gdf_bzd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

## NotifyAction : addSay() {#ariaid-title36}

Définit la synthèse vocale à lire lors de l'appel.
Plusieurs langues sont prises en charge avec la synthèse vocale. Les langues disponibles dépendent de l'opérateur de téléphonie.
{#r_NotifyAction-addSay__table_k1d_v24_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 69. Paramètres]

{#r_NotifyAction-addSay__table_k1d_v24_wr} {#r_NotifyAction-addSay__table_l1d_v24_wr__entry__2}

| Type | Description |
|-|-|
| SayAction (en anglais seulement) | Action ajoutée à l'objet NotifyAction. Utilisez l'objet SayAction pour définir le texte et la langue à lire. |
[Tableau 70. Renvoie]

{#r_NotifyAction-addSay__table_l1d_v24_wr}  
Cet exemple illustre la lecture de texte en plusieurs langues.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction : addSay.setLanguage(langue de chaîne) {#ariaid-title37}

Définit la langue dans laquelle prononcer le texte.
Utilisez cette méthode en conjonction avec la méthode setText() pour définir le verbiage à parler.
{#NotifyAction-addSay_setLanguage_S__table_xsp_3bc_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| language | Chaîne | Code de langue ISO 3166 qui définit la langue dans laquelle prononcer le texte associé. Par exemple, \<\< en-US \>\> ou \<\< nl-NL \>\>. |
[Tableau 71. Paramètres]

{#NotifyAction-addSay_setLanguage_S__table_xsp_3bc_cgb} {#NotifyAction-addSay_setLanguage_S__table_ysp_3bc_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 72. Renvoie]

{#NotifyAction-addSay_setLanguage_S__table_ysp_3bc_cgb}  
Cet exemple illustre la lecture de texte en plusieurs langues.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction : addSay.setText(Texte de chaîne) {#ariaid-title38}

Définit le texte à lire dans l'appel actuel.
Utilisez cette méthode en conjonction avec la méthode setLanguage() pour définir la langue dans laquelle prononcer le texte fourni.
{#NotifyAction-addSay_setText_S__table_mz3_gvs_1gb__entry__3}

| Nom | Type | Description |
|-|-|-|
| Texte | Chaîne | Texte à lire à haute voix dans l'appel en cours. |
[Tableau 73. Paramètres]

{#NotifyAction-addSay_setText_S__table_mz3_gvs_1gb} {#NotifyAction-addSay_setText_S__table_nz3_gvs_1gb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 74. Renvoie]

{#NotifyAction-addSay_setText_S__table_nz3_gvs_1gb}  
Cet exemple illustre la lecture de texte en plusieurs langues.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction : addSMS() {#ariaid-title39}

Envoie un message SMS.
Remarque :  
Lors de l'utilisation de cette fonction avec un appel actif, vous n'avez pas besoin d'appeler la fonction setTo sur l'objet SMSAction retourné. Le SMS est automatiquement envoyé à l'appelant.
{#r_NotifyAction-addSMS__table_gw2_kg4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 75. Paramètres]

{#r_NotifyAction-addSMS__table_gw2_kg4_wr} {#r_NotifyAction-addSMS__table_hw2_kg4_wr__entry__2}

| Type | Description |
|-|-|
| SMSAction | Action ajoutée à l'objet NotifyAction. Utilisez l'objet SMSAction pour définir le texte du message et le numéro de téléphone auquel envoyer le message. |
[Tableau 76. Renvoie]

{#r_NotifyAction-addSMS__table_hw2_kg4_wr}  

    // Instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // Define where to send the SMS to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // Add an SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction : addSMS.setMessage(message de chaîne) {#ariaid-title40}

Définit le texte du message SMS à envoyer.
{#NotifyAction-addSMS_setMessage_S__table_b2q_szd_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| message | Chaîne | Texte du SMS à envoyer. |
[Tableau 77. Paramètres]

{#NotifyAction-addSMS_setMessage_S__table_b2q_szd_cgb} {#NotifyAction-addSMS_setMessage_S__table_c2q_szd_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 78. Renvoie]

{#NotifyAction-addSMS_setMessage_S__table_c2q_szd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // define where to send the sms to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // add a SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction : addSMS.setTo(String to) {#ariaid-title41}

Définit le numéro de téléphone auquel envoyer le SMS.
{#NotifyAction-addSMS_setTo_S__table_qtf_212_cgb__entry__3}

| Nom | Type | Description |
|-|-|-|
| à | Chaîne | Numéro de téléphone compatible E.164 sur lequel envoyer le message SMS. |
[Tableau 79. Paramètres]

{#NotifyAction-addSMS_setTo_S__table_qtf_212_cgb} {#NotifyAction-addSMS_setTo_S__table_rtf_212_cgb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 80. Renvoie]

{#NotifyAction-addSMS_setTo_S__table_rtf_212_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // define where to send the sms to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // add a SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction : ajouter (action NotifyAction) {#ariaid-title42}

Ajoute l'objet NotifyAction spécifié à l'objet NotifyAction du client actuel.
Il existe deux types de NotifyActions : terminal et non terminal. Une fois que vous ajoutez une action de terminal à l'objet NotifyAction d'un client, vous ne pouvez pas ajouter d'actions supplémentaires. Les actions non terminales comprennent :

* PlayAction (en anglais)
* RecordAction
* SayAction (en anglais seulement)
* SMSAction
{#NotifyAction-append_NA__ul_lfb_rqy_cgb}

Tous les autres NotifyActions sont terminaux. Si vous essayez d'ajouter une autre NotifyAction après une action de terminal, l'appel échouera.
{#NotifyAction-append_NA__table_rl3_3bx_zfb__entry__3}

| Nom | Type | Description |
|-|-|-|
| action | NotifyAction (en anglais seulement) | Objet NotifyAction à ajouter à l'objet NotifyAction de l'appelant actuel. |
[Tableau 81. Paramètres]

{#NotifyAction-append_NA__table_rl3_3bx_zfb} {#NotifyAction-append_NA__table_sl3_3bx_zfb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 82. Renvoie]

{#NotifyAction-append_NA__table_sl3_3bx_zfb}

## NotifyAction : fromJson(chaîne json) {#ariaid-title43}

Désérialiser un objet NotifyAction à partir d'une chaîne JSON.
{#r_NotifyAction-fromJson_String__table_qc2_c34_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| JSON | Chaîne | Représentation de chaîne JSON d'un objet NotifyAction . |
[Tableau 83. Paramètres]

{#r_NotifyAction-fromJson_String__table_qc2_c34_wr} {#r_NotifyAction-fromJson_String__table_rc2_c34_wr__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 84. Renvoie]

{#r_NotifyAction-fromJson_String__table_rc2_c34_wr}  
Cet exemple illustre la désérialisation d'un objet NotifyAction.

    var json = ".... some json obtained from toJson ....";

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // deserialize and reconstruct the notify action instance
    notifyAction.fromJson(json);

Cet exemple illustre à la fois la sérialisation et la désérialisation d'un objet NotifyAction.

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add a queue
    var queue = notifyAction.addQueue();
    queue.setName('myQueueName');
    queue.setDequeue(false);

    // serialize to json
    var json = notifyAction.toJson();
    gs.log('serialization result: ' + json);

    // instantiate a new notify action
    var newAction = new SNC.NotifyAction();

    // deserialize the json generated above
    newAction.fromJson(json);

    // serialize the new object and log the result
    newJson = newAction.toJson();
    gs.log('new serialization result: ' + newJson);
    gs.log('the same: ' + (json == newJson));

Sortie : \*\*\* Script : résultat de la sérialisation : {"fClassName \>\> :"NotifyAction \>\>,"fActions \>\> :\[{"fClassName \>\> :"QueueAction \>\>,"fDequeue \>\> :true,"fQueueName \>\> :"myQueueName"}\]} \*\*\* Script : nouveau résultat de sérialisation : {"fClassName \>\> :"NotifyAction \>\>,"fActions \>\> :\[{"fClassName \>\> :"QueueAction \>\>,"fDequeue \>\> :true,"fQueueName \>\> :"myQueueName"}\]} \*\*\* Script : identique : vrai

## NotifyAction : setCallRecord(GlideRecord callRecord) {#ariaid-title44}

Définit l'enregistrement d'appel de Notification dans lequel ajouter des actions suivantes.
{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb__entry__3}

| Nom | Type | Description |
|-|-|-|
| callRecord | GlideRecord | GlideRecord contenant l'enregistrement de l'appelant (dans la table notify_call) pour lequel des actions doivent être ajoutées. Cet appelant reste dans l'effet jusqu'à ce que cette méthode soit appelée à nouveau avec un autre appelant. |
[Tableau 85. Paramètres]

{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb} {#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 86. Renvoie]

{#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb}  
Cet exemple montre comment définir l'appelant auquel vous souhaitez ajouter des actions.

    public NotifyAction runIncomingCallWorkflow(NotifyPhoneNumber notifyPhoneNumber, GlideRecord callRecord) throws NoWorkflowConfiguredException, NoSuchNotifyGroupRecordException {
       NotifyAction notifyAction = runWorkflow(notifyPhoneNumber, COL_INCOMING_CALL_WF, callRecord);
       notifyAction.setCallRecord(callRecord);
       return notifyAction;
    }

## NotifyAction : toJson() {#ariaid-title45}

Sérialiser l'objet NotifyAction en une chaîne JSON.
{#r_NotifyAction-toJson__table_ygy_xh4_wr__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 87. Paramètres]

{#r_NotifyAction-toJson__table_ygy_xh4_wr} {#r_NotifyAction-toJson__table_zgy_xh4_wr__entry__2}

| Type | Description |
|-|-|
| Chaîne | Représentation JSON de cet objet NotifyAction. |
[Tableau 88. Renvoie]

{#r_NotifyAction-toJson__table_zgy_xh4_wr}  
Cet exemple illustre la sérialisation d'un objet NotifyAction.

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add one or more notify actions
    // ...

    // and serialize to json
    var json = notifyAction.toJson();

Cet exemple illustre à la fois la sérialisation et la désérialisation d'un objet NotifyAction.

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add a queue
    var queue = notifyAction.addQueue();
    queue.setName('myQueueName');
    queue.setDequeue(false);

    // serialize to json
    var json = notifyAction.toJson();
    gs.log('serialization result: ' + json);

    // instantiate a new notify action
    var newAction = new SNC.NotifyAction();

    // deserialize the json generated above
    newAction.fromJson(json);

    // serialize the new object and log the result
    newJson = newAction.toJson();
    gs.log('new serialization result: ' + newJson);
    gs.log('the same: ' + (json == newJson));

Sortie : \*\*\* Script : résultat de la sérialisation : {"fClassName \>\> :"NotifyAction \>\>,"fActions \>\> :\[{"fClassName \>\> :"QueueAction \>\>,"fDequeue \>\> :true,"fQueueName \>\> :"myQueueName"}\]} \*\*\* Script : nouveau résultat de sérialisation : {"fClassName \>\> :"NotifyAction \>\>,"fActions \>\> :\[{"fClassName \>\> :"QueueAction \>\>,"fDequeue \>\> :true,"fQueueName \>\> :"myQueueName"}\]} \*\*\* Script : identique : vrai

