Update a resource user
/crmRestApi/resources/11.13.18.05/resourceUsers/{resourceUsersUniqID}
Request
-
resourceUsersUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Resource Users resource and used to uniquely identify an instance of Resource Users. The client should not generate the hash key value. Instead, the client should query on the Resource Users collection resource in order to navigate to a specific instance of Resource Users to get the hash key.
-
Metadata-Context: string
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version: string
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
- application/json
object-
AddressLine1: string
Title:
Address Line 1Maximum Length:240The first line of the address of the resource. -
AddressLine2: string
Title:
Address Line 2Maximum Length:240The second line of the address of the resource. -
County: string
Title:
CountyMaximum Length:60The name of the county provided in the resource's address. -
CreateUserAccountFlag: boolean
Title:
Create User AccountIndicates whether a user account can be created for the resource. The default value is true. -
FaxCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code of the fax. -
FirstName: string
Title:
First NameMaximum Length:150The first name of the resource. -
HRManagerEmailAddress: string
Title:
HR Manager EmailThe email address of the human resource manager of the resource. -
IndividualRoleCode: string
Title:
Individual Role CodeMaximum Length:255The special individual role of the user. -
IndividualRoleEndDate: string
(date)
Title:
Individual Role End DateThe date when the individual role ends. -
IndividualRoleStartDate: string
(date)
Title:
Individual Role Start DateThe date when the individual role starts. -
JobCode: string
Title:
Job CodeThe job code assigned to the resource. -
LastName: string
Title:
Last NameMaximum Length:150The last name of the resource. -
MiddleName: string
Title:
Middle NameMaximum Length:60The middle name of the resource. -
MobilePhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the mobile phone. -
PersonType: string
Title:
Person TypeThe type of the work relationship of a worker associated with the resource. For exampe, Employee, Contingent, or Worker. -
Province: string
Title:
ProvinceMaximum Length:60The name of the province provided in the resource's address. -
RawFaxNumber: string
Title:
FaxMaximum Length:60The fax number of the resource in raw format. -
RawMobilePhoneNumber: string
Title:
Mobile PhoneMaximum Length:60The mobile phone number of the resource. -
RawWorkPhoneNumber: string
Title:
Work PhoneMaximum Length:60The resource's work phone number in raw format. -
ResourceEmail: string
Title:
EmailMaximum Length:320The email address of the resource. -
ResourceEndDate: string
(date)
Title:
To DateThe date up to which the resource is active. -
ResourceManagerFirstName: string
Title:
Manager First NameMaximum Length:255The first name of the reporting manager of the resource. -
ResourceManagerLastName: string
Title:
Manager Last NameMaximum Length:255The last name of the reporting manager of the resource. -
ResourceManagerName: string
Title:
Manager NameMaximum Length:255The name of the manager of the resource. -
ResourceOrganizationName: string
Title:
OrganizationMaximum Length:255The name of the resource organization associated to the resource in managerial role. -
ResourceOrgManagerEmail: string
Title:
Manager EmailMaximum Length:255The email address of the reporting manager of the resource. -
ResourceOrgMemRoleEndDate: string
(date)
Title:
Membership Role End DateThe date when the membership of the resource ends. -
ResourceOrgMemRoleStartDate: string
(date)
Title:
Organization Membership Role Start DateThe date when the resource becomes a member of the organization. -
ResourceOrgRoleCode: string
Title:
Organization Role CodeMaximum Length:255The code indicating the role of the resource in association with organization membership. For example, SALES_REPRESENTATIVE or SALES_MANAGER. -
ResourceParentOrganizationName: string
Title:
Parent OrganizationMaximum Length:255The name of the organization to which the manager of the resource is associated. -
ResourcePartyNumber: string
Title:
Party NumberMaximum Length:30The unique identifier of the party associated with the resource. -
ResourceRoleAssign: array
Resource Role Assignments
Title:
Resource Role AssignmentsThe resource role assignments resource is used to view the role assigned to a resource, such as implementer, reseller, and so on. -
ResourceStartDate: string
(date)
Title:
Resource Start DateThe date when the resource becomes active. -
ResourceType: string
Title:
UsageThe type of the resource. -
State: string
Title:
StateMaximum Length:60The name of the state provided in the resource's address. -
TimezoneCode: string
Title:
Time Zone CodeMaximum Length:64The code for the time zone of the resource. -
Title: string
Title:
TitleMaximum Length:60The title preceding the name of the resource. -
TopResourceFlag: boolean
Title:
Root ResourceDefault Value:falseIndicates whether the resource is top user in hierarchy. -
UserStatus: string
Title:
User Account StatusMaximum Length:255Indicates the the status of the user account for the resource. The supported values are A for active and S for suspended. The status is set to A for new accounts. -
WorkPhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the work phone.
arrayResource Role Assignmentsobject-
EndDateActive: string
(date)
Title:
To DateThe date when the resource role becomes inactive.
Response
- application/json
Default Response
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
object-
AddressLine1: string
Title:
Address Line 1Maximum Length:240The first line of the address of the resource. -
AddressLine2: string
Title:
Address Line 2Maximum Length:240The second line of the address of the resource. -
BusinessUnit: string
Title:
Business UnitThe name of the business unit associated with the resource. -
City: string
Title:
CityRead Only:trueMaximum Length:60The name of the city provided in the resource's address. -
Country: string
Title:
CountryRead Only:trueMaximum Length:2The name of the country provided in the resource's address. -
County: string
Title:
CountyMaximum Length:60The name of the county provided in the resource's address. -
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created the record. -
CreateUserAccountFlag: boolean
Title:
Create User AccountIndicates whether a user account can be created for the resource. The default value is true. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date and time when the record was created. -
DeleteFlag: boolean
Read Only:
trueIndicates if the user can delete the resource. -
FaxCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code of the fax. -
FirstName: string
Title:
First NameMaximum Length:150The first name of the resource. -
FormattedAddress: string
Title:
AddressRead Only:trueMaximum Length:255The primary formatted address of the resource. -
HireDate: string
(date)
Title:
Hire DateThe date when the resource was hired. -
HRManagerEmailAddress: string
Title:
HR Manager EmailThe email address of the human resource manager of the resource. -
IndividualRoleCode: string
Title:
Individual Role CodeMaximum Length:255The special individual role of the user. -
IndividualRoleEndDate: string
(date)
Title:
Individual Role End DateThe date when the individual role ends. -
IndividualRoleStartDate: string
(date)
Title:
Individual Role Start DateThe date when the individual role starts. -
JobCode: string
Title:
Job CodeThe job code assigned to the resource. -
JobTitle: string
Title:
Job TitleRead Only:trueThe title of the job assigned to the resource. -
LastName: string
Title:
Last NameMaximum Length:150The last name of the resource. -
LastUpdateDate: string
(date-time)
Title:
Last Update DateRead Only:trueThe date when the record was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the record. -
LegalEntity: string
Title:
Legal EntityThe name of the legal entity of associated with the resource. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
MiddleName: string
Title:
Middle NameMaximum Length:60The middle name of the resource. -
MobilePhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the mobile phone. -
PartyName: string
Title:
Resource NameRead Only:trueMaximum Length:360The name of the person. -
PersonNumber: string
Title:
Person NumberRead Only:trueThe person number identifier of the worker record of the resource. -
PersonType: string
Title:
Person TypeThe type of the work relationship of a worker associated with the resource. For exampe, Employee, Contingent, or Worker. -
PostalCode: string
Title:
Postal CodeRead Only:trueMaximum Length:60The postal code for the address of resource. -
Province: string
Title:
ProvinceMaximum Length:60The name of the province provided in the resource's address. -
RawFaxNumber: string
Title:
FaxMaximum Length:60The fax number of the resource in raw format. -
RawMobilePhoneNumber: string
Title:
Mobile PhoneMaximum Length:60The mobile phone number of the resource. -
RawWorkPhoneNumber: string
Title:
Work PhoneMaximum Length:60The resource's work phone number in raw format. -
ResourceEmail: string
Title:
EmailMaximum Length:320The email address of the resource. -
ResourceEndDate: string
(date)
Title:
To DateThe date up to which the resource is active. -
ResourceManagerFirstName: string
Title:
Manager First NameMaximum Length:255The first name of the reporting manager of the resource. -
ResourceManagerLastName: string
Title:
Manager Last NameMaximum Length:255The last name of the reporting manager of the resource. -
ResourceManagerName: string
Title:
Manager NameMaximum Length:255The name of the manager of the resource. -
ResourceManagerPartyId: integer
Title:
Manager Party IDRead Only:trueThe unique identifier of the reporting manager of the resource. -
ResourceManagerPartyNumber: string
Title:
Manager Party NumberRead Only:trueMaximum Length:255The unique public identifier of the reporting manager of the resource. -
ResourceOrganizationName: string
Title:
OrganizationMaximum Length:255The name of the resource organization associated to the resource in managerial role. -
ResourceOrganizationUsage: string
Title:
Organization UsageRead Only:trueMaximum Length:255The usage type of the resource organization. For example, Sales or Marketing. -
ResourceOrgManagerEmail: string
Title:
Manager EmailMaximum Length:255The email address of the reporting manager of the resource. -
ResourceOrgMemRoleEndDate: string
(date)
Title:
Membership Role End DateThe date when the membership of the resource ends. -
ResourceOrgMemRoleStartDate: string
(date)
Title:
Organization Membership Role Start DateThe date when the resource becomes a member of the organization. -
ResourceOrgRoleCode: string
Title:
Organization Role CodeMaximum Length:255The code indicating the role of the resource in association with organization membership. For example, SALES_REPRESENTATIVE or SALES_MANAGER. -
ResourceOrgRoleName: string
Read Only:
trueMaximum Length:255The role that defines the function of the resource in an organization or hierarchy. -
ResourceParentOrganizationName: string
Title:
Parent OrganizationMaximum Length:255The name of the organization to which the manager of the resource is associated. -
ResourcePartyId: integer
(int64)
Title:
Party IDThe unique identifier of the party associated with the resource. -
ResourcePartyNumber: string
Title:
Party NumberMaximum Length:30The unique identifier of the party associated with the resource. -
ResourceProfileId: integer
(int64)
Title:
Profile IDRead Only:trueThe unique identifier of the profile of the resource. -
ResourceRoleAssign: array
Resource Role Assignments
Title:
Resource Role AssignmentsThe resource role assignments resource is used to view the role assigned to a resource, such as implementer, reseller, and so on. -
ResourceStartDate: string
(date)
Title:
Resource Start DateThe date when the resource becomes active. -
ResourceType: string
Title:
UsageThe type of the resource. -
State: string
Title:
StateMaximum Length:60The name of the state provided in the resource's address. -
TimezoneCode: string
Title:
Time Zone CodeMaximum Length:64The code for the time zone of the resource. -
Title: string
Title:
TitleMaximum Length:60The title preceding the name of the resource. -
TopResourceFlag: boolean
Title:
Root ResourceDefault Value:falseIndicates whether the resource is top user in hierarchy. -
UpdateFlag: boolean
Title:
Update AccessRead Only:trueIndicates if the user can update the resource. -
Username: string
Title:
User NameRead Only:trueThe user name or account name, used for login, of the resource user. -
UserStatus: string
Title:
User Account StatusMaximum Length:255Indicates the the status of the user account for the resource. The supported values are A for active and S for suspended. The status is set to A for new accounts. -
WorkPhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the work phone.
arrayLinksarrayResource Role Assignmentsobject-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
object-
EndDateActive: string
(date)
Title:
To DateThe date when the resource role becomes inactive. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
PartyName: string
Title:
ResourceMaximum Length:360The name of the party. -
RoleCode: string
Read Only:
trueMaximum Length:30The value of the code for the role assigned to the resource. -
RoleId: integer
Title:
RoleThe unique identifier of the role. -
RoleRelateId: integer
Read Only:
trueRole Relation identifier (PK) -
RoleResourceId: integer
The unique identifier of the resource role.
-
StartDateActive: string
(date)
Title:
From DateThe date when the resource role become active.
arrayLinks- FaxCountryCodeVA
-
The following properties are defined on the LOV link relation:
- Source Attribute: FaxCountryCode; Target Attribute: PhoneCountryCode
- Display Attribute: PhoneCountryCode, TerritoryShortName
- MobilePhoneCountryCodeVA
-
The following properties are defined on the LOV link relation:
- Source Attribute: MobilePhoneCountryCode; Target Attribute: PhoneCountryCode
- Display Attribute: PhoneCountryCode, TerritoryShortName
- ResourceRoleAssign
-
Operation: /crmRestApi/resources/11.13.18.05/resourceUsers/{resourceUsersUniqID}/child/ResourceRoleAssignParameters:
- resourceUsersUniqID:
$request.path.resourceUsersUniqID
The resource role assignments resource is used to view the role assigned to a resource, such as implementer, reseller, and so on. - resourceUsersUniqID:
- WorkPhoneCountryCodeVA
-
The following properties are defined on the LOV link relation:
- Source Attribute: WorkPhoneCountryCode; Target Attribute: PhoneCountryCode
- Display Attribute: PhoneCountryCode, TerritoryShortName
Examples
Note:
When you add roles to resources without a start date, the start date is set to the hire date of the resource.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/resourceUsers/CDRM_885912Example of Request Body
The following example shows the contents of the request body in JSON format.
{
"FirstName": "ABCDE_updated"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"ResourceProfileId": 300100185303175,
"PartyName": "ABCDE_updated 20200717_1706",
"LastUpdateDate": "2020-07-20T07:31:46.594+00:00",
"LastUpdatedBy": "sales_admin",
"CreationDate": "2020-07-20T07:31:27.001+00:00",
"CreatedBy": "sales_admin",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": null,
"TimezoneCode": null,
"Username": "ABC_20200717_1706@oracle.com",
"City": null,
"Country": null,
"PostalCode": null,
"UpdateFlag": "true",
"DeleteFlag": "false",
"ResourceOrgRoleCode": null,
"ResourceOrgRoleName": null,
"FirstName": "ABCDE_updated",
"LastName": "20200717_1706",
"MiddleName": null,
"Title": "MR.",
"ResourcePartyNumber": "CDRM_885912",
"State": null,
"ResourceEmail": "ABC_20200717_1706@oracle.com",
"WorkPhoneCountryCode": null,
"RawWorkPhoneNumber": null,
"MobilePhoneCountryCode": null,
"RawMobilePhoneNumber": null,
"FaxCountryCode": null,
"RawFaxNumber": null,
"AddressLine1": null,
"AddressLine2": null,
"ResourceStartDate": "2007-05-01",
"ResourceEndDate": "4712-12-31",
"ResourcePartyId": 300100185303176,
"ResourceOrganizationName": null,
"ResourceOrganizationUsage": null,
"ResourceOrgMemRoleEndDate": null,
"ResourceParentOrganizationName": null,
"ResourceOrgManagerEmail": null,
"ResourceManagerName": null,
"ResourceManagerFirstName": null,
"ResourceManagerLastName": null,
"HRManagerEmailAddress": null,
"HireDate": "2007-05-01",
"ResourceOrgMemRoleStartDate": null,
"IndividualRoleCode": "SALES_MANAGER",
"IndividualRoleStartDate": "2007-05-01",
"IndividualRoleEndDate": "4712-12-31",
"ResourceManagerPartyNumber": null,
"County": null,
"Province": null,
"ResourceManagerPartyId": null,
"TopResourceFlag": null,
"PersonNumber": "300100185303181",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"JobCode": null,
"JobTitle": null,
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
"__ORACO__DistributionCentre_Id_c": null,
"__ORACO__DistributionCentre_c": null,
"__ORACO__Segment_c": null,
...
}Note:
When you are creating a new resource user, the CreateUserAccountFlag controls the user account creation for the resource. The default value for CreateUserAccountFlag is Y. If the flag is set to N, then the role provisioning is suppressed.Note:
UserStatus is A by default. To suspend a user, update the UserStatus to S using PATCH.Note:
You must run the following ESS jobs after creating or updating a resource:
-
Reporting Hierarchy Generation: This job updates the reporting hierarchy in accordance with the changes in internal resource or partner organization hierarchy. The resource's reporting manager is updated unless you run this ESS job.
-
Update Person Search Keywords: This job copies the keyword values automatically from the originating records to the PER_KEYWORDS table, where they are indexed to improve search performance.
-
Send Pending LDAP Requests: This job processes the pending LDAP requests to provision or deprovision the user accounts and roles. You can specify the parameters User Type and Batch Size with this job. You must specify User Type (usually select All); if you leave it as blank, then this process won't process any requests. If you don't set Batch Size, the default will be A for automatic, which is 1/10th of the total requests number. You can specify a number for batch size to instruct the process to group that number of requests together for single batch process. If you want the process to pick up the FAULTED requests from previous run, you can set Batch Size as AF.
Promote or Demote an Internal Resource
The following example shows how to promote or demote an internal resource by submitting a PATCH request on the REST resource using cURL. For more such examples see Manage Sales Resource Lifecycle.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta504976Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceOrgRoleCode":"SALES_VP"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"PartyName": "John Smith",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065",
"Username": "jsmith439906587",
"City": "Redwood City",
"Country": "US",
"PostalCode": "944065",
"FirstName": "John",
"LastName": "Smith",
"ResourcePartyNumber": "Conta504976",
"State": "CA",
"ResourceEmail": "john.smith@dnd.vision.com",
"RawWorkPhoneNumber": "6505061212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "500 Oracle Parkway",
"ResourceOrganizationName": "JSmithOrg",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode":"SALES_VP",
"ResourceParentOrganizationName" : "NA Sales",
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661235",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
...
}Promote or Demote an Internal Resource
The following example shows how to promote or demote an internal resource by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta504976Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceOrgRoleCode":"SALES_VP"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"PartyName": "John Smith",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065",
"Username": "jsmith439906587",
"City": "Redwood City",
"Country": "US",
"PostalCode": "944065",
"FirstName": "John",
"LastName": "Smith",
"ResourcePartyNumber": "Conta504976",
"State": "CA",
"ResourceEmail": "john.smith@dnd.vision.com",
"RawWorkPhoneNumber": "6505061212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "500 Oracle Parkway",
"ResourceOrganizationName": "JSmithOrg",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode":"SALES_VP",
"ResourceParentOrganizationName" : "NA Sales",
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661235",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
...
}Promote or Demote an Internal Resource
The following example shows how to promote or demote an internal resource by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta504976Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceOrgRoleCode":"SALES_VP"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"PartyName": "John Smith",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065",
"Username": "jsmith439906587",
"City": "Redwood City",
"Country": "US",
"PostalCode": "944065",
"FirstName": "John",
"LastName": "Smith",
"ResourcePartyNumber": "Conta504976",
"State": "CA",
"ResourceEmail": "john.smith@dnd.vision.com",
"RawWorkPhoneNumber": "6505061212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "500 Oracle Parkway",
"ResourceOrganizationName": "JSmithOrg",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode":"SALES_VP",
"ResourceParentOrganizationName" : "NA Sales",
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661235",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
...
}Promote or Demote an Internal Resource
The following example shows how to promote or demote an internal resource by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta504976Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceOrgRoleCode":"SALES_VP"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"PartyName": "John Smith",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065",
"Username": "jsmith439906587",
"City": "Redwood City",
"Country": "US",
"PostalCode": "944065",
"FirstName": "John",
"LastName": "Smith",
"ResourcePartyNumber": "Conta504976",
"State": "CA",
"ResourceEmail": "john.smith@dnd.vision.com",
"RawWorkPhoneNumber": "6505061212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "500 Oracle Parkway",
"ResourceOrganizationName": "JSmithOrg",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode":"SALES_VP",
"ResourceParentOrganizationName" : "NA Sales",
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661235",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
...
}Transfer an Internal Resource
The following example shows how to Transfer an Internal Resource by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta855676Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceParentOrganizationName":"GLOBAL_SALES"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"PartyName": "Katty Smith",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065",
"City": "Redwood City",
"Country": "US",
"PostalCode": "944065",
"FirstName": "Katty",
"LastName": "Smith",
"ResourcePartyNumber": "Conta855676",
"State": "CA",
"ResourceEmail": "katty.smith@dnd.vision.com",
"RawWorkPhoneNumber": "6505061212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "500 Oracle Parkway",
"ResourceOrganizationName": "KSmithOrg",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode":"SALES_REPRESENTATIVE",
"ResourceParentOrganizationName" : "GLOBAL_SALES",
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661235",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"UserStatus": "A",
"PersonType": "EMP",
"CreateUserAccountFlag": null,
...
}End-Date an Internal Resource
The following example shows how to end-date an internal resource by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982Example of Request Body
The following shows the contents of the request body in JSON format.
{
"ResourceEndDate": "2019-06-31"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"ResourceProfileId": 300100159661456,
"PartyName": "Diane Cho",
"LastUpdateDate": "2018-08-20T18:34:56.289+00:00",
"LastUpdatedBy": "SALES_ADMIN",
"CreationDate": "2018-08-20T18:34:29.001+00:00",
"CreatedBy": "SALES_ADMIN",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "100 Market Street,SAN FRANCISCO, CA 94105",
"TimezoneCode": null,
"Username": "dcho",
"City": "San Francisco",
"Country": "US",
"PostalCode": "94105",
"UpdateFlag": "true",
"DeleteFlag": "false",
"FirstName": "Diane",
"LastName": "Cho",
"MiddleName": null,
"Title": null,
"ResourcePartyNumber": "Conta765982",
"State": "CA",
"ResourceEmail": "diane.cho@dnd.vision.com",
"RawWorkPhoneNumber": "4155551212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "100 Market Street",
"AddressLine2": null,
"ResourceStartDate": "2018-08-20",
"ResourceEndDate": "2019-06-31",
"ResourcePartyId": 300100159661457,
"ResourceOrganizationName": "NA Sales",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode": "SALES_REPRESENTATIVE",
"ResourceParentOrganizationName": "NA Sales",
"ResourceOrgManagerEmail": "CEO.CRM+TM40@ap6023fems.us.vision.com",
"ResourceManagerName": null,
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"County": null,
"Province": null,
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661466",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"JobCode": null,
"JobTitle": null,
"UserStatus": "I",
"PersonType": "EMP",
...
}Suspend an User Account
The following example shows how to suspend an user account by submitting a PATCH request on the REST resource using cURL.
Note:
Use the following process if you wish to suspend an internal resource's account and also change any resource attributes. If you wish to simply suspend a user account and not change any resource attributes, then use the Users REST API .cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982Example of Request Body
The following shows the contents of the request body in JSON format.
{
"UserStatus" : "S"
}Example of Response Body
The following shows the contents of the response body in JSON format.
{
"ResourceProfileId": 300100159661456,
"PartyName": "Diane Cho",
"LastUpdateDate": "2018-08-20T18:34:56.289+00:00",
"LastUpdatedBy": "SALES_ADMIN",
"CreationDate": "2018-08-20T18:34:29.001+00:00",
"CreatedBy": "SALES_ADMIN",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "100 Market Street,SAN FRANCISCO, CA 94105",
"TimezoneCode": null,
"Username": "dcho",
"City": "San Francisco",
"Country": "US",
"PostalCode": "94105",
"UpdateFlag": "true",
"DeleteFlag": "false",
"FirstName": "Diane",
"LastName": "Cho",
"MiddleName": null,
"Title": null,
"ResourcePartyNumber": "Conta765982",
"State": "CA",
"ResourceEmail": "diane.cho@dnd.vision.com",
"RawWorkPhoneNumber": "4155551212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "100 Market Street",
"AddressLine2": null,
"ResourceStartDate": "2018-08-20",
"ResourceEndDate": "2019-01-31",
"ResourcePartyId": 300100159661457,
"ResourceOrganizationName": "NA Sales",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode": "SALES_REPRESENTATIVE",
"ResourceParentOrganizationName": "NA Sales",
"ResourceOrgManagerEmail": "CEO.CRM+TM40@ap6023fems.us.vision.com",
"ResourceManagerName": null,
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"County": null,
"Province": null,
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661466",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"JobCode": null,
"JobTitle": null,
"UserStatus": "S",
"PersonType": "EMP",
...
}Reactivate an User Account
The following example shows how to reactivate an user account by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl --user
sales_cloud_user -X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982Example of Request Body
The following shows the contents of the request body in JSON format.
{
"UserStatus" : "A"
}
Example of Response Body
The following shows the contents of the response body in JSON format.
{
"ResourceProfileId": 300100159661456,
"PartyName": "Diane Cho",
"LastUpdateDate": "2018-08-20T18:34:56.289+00:00",
"LastUpdatedBy": "SALES_ADMIN",
"CreationDate": "2018-08-20T18:34:29.001+00:00",
"CreatedBy": "SALES_ADMIN",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": "100 Market Street,SAN FRANCISCO, CA 94105",
"TimezoneCode": null,
"Username": "dcho",
"City": "San Francisco",
"Country": "US",
"PostalCode": "94105",
"UpdateFlag": "true",
"DeleteFlag": "false",
"FirstName": "Diane",
"LastName": "Cho",
"MiddleName": null,
"Title": null,
"ResourcePartyNumber": "Conta765982",
"State": "CA",
"ResourceEmail": "diane.cho@dnd.vision.com",
"RawWorkPhoneNumber": "4155551212",
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": "100 Market Street",
"AddressLine2": null,
"ResourceStartDate": "2018-08-20",
"ResourceEndDate": "2019-01-31",
"ResourcePartyId": 300100159661457,
"ResourceOrganizationName": "NA Sales",
"ResourceOrganizationUsage": "SALES_RESOURCE_ORG",
"ResourceOrgMemRoleEndDate": "4712-12-31",
"ResourceOrgRoleCode": "SALES_REPRESENTATIVE",
"ResourceParentOrganizationName": "NA Sales",
"ResourceOrgManagerEmail": "CEO.CRM+TM40@ap6023fems.us.vision.com",
"ResourceManagerName": null,
"ResourceManagerFirstName": "Phil",
"ResourceManagerLastName": "Gioco",
"HRManagerEmailAddress": "hrMan247134917@vision.com",
"HireDate": "2018-08-20",
"ResourceOrgMemRoleStartDate": "2018-08-20",
"ResourceManagerPartyNumber": "100010034246635",
"County": null,
"Province": null,
"ResourceManagerPartyId": 100010034246635,
"PersonNumber": "300100159661466",
"BusinessUnit": "Vision Corporation Enterprise",
"LegalEntity": "Vision Corporation",
"JobCode": null,
"JobTitle": null,
"UserStatus": "A",
"PersonType": "EMP",
...
}