Clarity Service Management

add_contact 

02-27-2016 05:06 AM

SPEL API methods

add_contact

 

This method allows to create new contact

 

Definition:

add_contact( uuid, ... );

uuid - user id

... - name-value pairs for the attributes to update "atribute1", "value1","atribute2", "value2"

 

working example:

This example will create contact with administrator access type

uuid who;  
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");  
who=msg[0];  
send_wait(0, top_object(), "call_attr", "api", "add_contact", who, "userid", "Admin", "last_name", "Adminuser", "access_type", 10002);
 if (msg_error()) {
   logf(ERROR, "get_failed %s",msg[0]);
 }
}

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.