Creating user need to: Change Password , assign Caller Input

Version 1
    This document was generated from CDN thread

    Created by: Shadan Saniepour Esfahani on 16-02-2010 10:26:27 PM
    Greetings experts
     
    I am using CUPI to provision a user on CUC. I need to:
    1- check the "User Must Change at Next Login" box in the PAssword Settings.
    2- Caller input "4" needs to go to a specific callhandler
     
    How can I do that using CUPI? Your help is much appreciated.
    Best regards
    Shadan

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Kelley Rogers on 17-02-2010 07:05:22 PM
    Hi Shadan,
     
    I am new to the API and learning it myself, but I think I know the answer to #1.
     
    This is the PUT request that will set the flag so that the user must change their credentials on next login for the phone password.
     
    PUT  https://<server>/vmrest/users/<userobjectid>/credential/password
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Credential>
            <CredMustChange>true</CredMustChange>
        </Credential>
     
    -kelro

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Kelley Rogers on 17-02-2010 07:33:07 PM
    Figured out #2 as well.  Its a bit more complicated.  You will need to the object id of the call handler for the user whose caller input key you want to change.  Every user has a call handler, and if you are looking at the user data returned from a GET, its under the tag <CallHandlerObjectId>.  This is the object id of the user's call handler.
     
    So now you just do the following PUT...
     
    PUT  https://<server>/vmrest/handlers/callhandlers/<callhandlerobjectid>/menuentries/4
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <MenuEntry>
            <Action>2</Action>
            <TargetConversation>PHTransfer</TargetConversation>
            <TargetHandlerObjectId>object id of target call handler goes here</TargetHandlerObjectId>
        </MenuEntry>
     
    What does all this mean?  Good question.
     
    The Action is a custom type that is set to a different value depending on what you want the caller input key to do.  The Action type is used in lots of places, so its not the case that all possible values of the Action type are valid in certain areas.  Here is a list of possible values and what they mean...
    0: Ignore - no action taken.
    1: Hangup - the call is immediately terminated.
    2: Goto - go to an object such as a call handler, directory handler or interview handler.
    3: Error - play the error greeting.
    4: Take a message.
    5: Skip greeting.
    6: RestartGreeting - restart greeting on current handler
    7: Transfer to Alternate Contact Number
    8: Route From Next Call Routing Rule
     
    The TargetConversation should be set to PHTransfer if you want to transfer to the call handler in question.  If you just want to have the call go directly the call handlers greeting, set it to PHGreeting instead.
     
    Then lastly, the TargetHandlerObjectId is the call handler object id of the call handler that you want the 4 key to take the caller to.
     
    Hopefully that helps.
     
    -kelro

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Shadan Saniepour Esfahani on 17-02-2010 08:35:36 PM
    Thanks much Kelly. I will try this and wil lkeep you posted on how it goes!
    Thanks again and best regards
    Shadan

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Shadan Saniepour Esfahani on 19-02-2010 06:13:20 PM
    Hi Kelly
     
    The GET request for user does not return any CallHandlerObjectId, so I was not able to try your solution. Does it work for you? Not all users have callhandlers, but we can assign caller input to them anyway. Any thoughts?
     
    Thanks much and best regards
    Shadan

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Kelley Rogers on 19-02-2010 10:09:30 PM
    If I do a GET https://<server>/vmrest/users/<userobjectid>, one of the elements that comes back in the resulting XML is a <CallHandlerObjectId>.
     
    Every user that has greetings (and caller input keys) has a call handler...that is how greetings are implemented...all via call handlers.  There is the notion of users without mailboxes...they do not have call handlers and thus no greetings or caller input keys or any such stuff.
     
    Assuming you are doing the correct GET, what is coming back?

    Subject: RE: Creating user need to: Change Password , assign Caller Input
    Replied by: Shadan Saniepour Esfahani on 22-02-2010 05:13:43 PM
    Thanks Kelley
     
    I was doing the wrong GET. I was doing GET [url=https://<server>/vmrest/users/]https://<server>/vmrest/users/ and looking for the my user t find its handler. However Callhandler objectId was not there. I did the GET query for that specific user as you suggested and I was able to retrieve the callhandlerobjectid.
     
    Thanks much for your help!! Really appreciate it!
    Best regards
    Shadan