projects/congarevenuecloud/ecommerce/src/lib/modules/crm/services/contact.service.ts
This service is a work in progress.
The contact service provides methods for interacting with the contacts the current user has access to.
import { ContactService, AObjectService} from '@congarevenuecloud/ecommerce';
export class MyComponent implements OnInit{
constructor( private contactService: ContactService)
}
// or
export class MyService extends AObjectService {
private contactService: ContactService = this.injector.get(ContactService);
}
AObjectService
Properties |
|
Methods |
|
createNewContact | ||||||||
createNewContact(contact: Contact)
|
||||||||
This method can be used to create a new contact record on Conga platform.
Parameters :
Returns :
Observable<string>
string observable representing the identifier of the contact record created. |
Public getContact | ||||||||
getContact(objQueryParams: Object)
|
||||||||
Gets the contact record based on first name, last name and email address passed. Example:Example :
Parameters :
Returns :
Observable<Contact>
an observable containing the current contact record matching the search criteria. |
Public getContactById | ||||||||
getContactById(Id: string)
|
||||||||
The method fetches the contact based on given contact Id in parameter.
Parameters :
Returns :
Observable<Contact>
An observable containing the Contact for a given contact Id. |
Public getContactForUser |
getContactForUser()
|
Gets the contact record for the current user. If the user is not logged in. Example:Example :
Returns :
Observable<Contact>
an Observable containing the current contact record |
Public getMyContact |
getMyContact()
|
Gets the contact record for the current user. If the user is not logged in, it will return a new contact instance. Example:Example :
Returns :
Observable<Contact>
an observable containing the current contact record. |
type |
Default value : Contact
|
Protected userService |
Default value : this.injector.get(UserService)
|