You can create a new group by using the the Address Book Manipulator function PCAB_New( Type ), where the type specifies the type of record to create. The type is either “Person” or “Group”. You can also create a new subgroup by using the PCAB_AddSubGroup( Address Book ID ).

When handling groups, the script needs to open the group record and then add contacts to the specified group. To open the Group record you will need to locate it using the PCAB_Search function. For example: PCAB_Search( "Group" ; "Name" ; "" ; "" ; "GroupName" ; "Equal" ). This will find the group with the name "GroupName". The search will return the number of records found that match the search criteria. The scripts use the  PCAB_OpenFirstRecord function to get the Address Book ID of the record. Then with the Group record opened use the PCAB_AddPerson function to add contacts to the group and done!

Script will look something like this:
PCAB_Search( "Group" ; "Name" ; "" ; "" ; "Sales" ; "Equal" )