Manage Service Resource Life Cycle
John Smith is a Service Manager with Vision Corporation. He has several customer service representatives in his organization who are internal resources - persons who are either employee or contingent workers. Vision Corporation uses Oracle CX Sales and Fusion Service with a third-party human resources management system (HRMS), First Software. How would you go about integrating the two systems to seamlessly manage the various stages of John's team life cycle, such as hiring, promotion, demotion, transfer, and role change?
Resources as employees are created in First Software and you must synchronize Oracle CX Sales and Fusion Service periodically with the First Software. REST APIs is the best way to bring in information from First Software into Oracle CX Sales and Fusion Service. They let you easily update information in Oracle CX Sales and Fusion Service, as compared to import. You can use the Resources Users API to update information in Sales and Fusion Service. However, you cannot use the API to perform HCM related transactions.
Note:
When creating the user records with phone number you must provide the correct country code.Note:
Currently, these API methods support only internal resources. Internal resources are employees, or contingent workers who belong to the organization.If you are using Oracle CX Sales and Fusion Service along with other Oracle Applications Cloud modules, then use this API to manage only internal resources and not to manage workflows related to a HR person or worker. The Human Capital Management Cloud includes REST APIs that support auditing and business workflows.
- Support for additional attributes (other than those supported by the Resource User REST API).
- Audit when the HR attributes of a resource change. The REST API only supports management of a person's attributes, it does not support updating or auditing.
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.
Create an Internal Resource
- Construct the request URL for the Create a resource user operation.
- Construct the request body with Jane's details. You must provide a unique user name and email for Jane.
- Use an appropriate REST API client or the cURL command-line utility to make the POST call.
Note:
When creating an internal resource, you cannot use an existing email or username. If you enter an existing user name or resource, then the following error is displayed in the response.
Please provide
a unique combination such that a single resource is identified.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers
cURL Command
curl --user sales_cloud_user -X
POST -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers
Request Payload
Here's an example of the request body in JSON format.
{ "FirstName":"Jane", "LastName":"Doe", "ResourceEmail":"jane.doe@dnd.vision.com", "HireDate":"2018-08-20", "LegalEntity":"Vision Corporation", "BusinessUnit":"Vision Corporation Enterprise", "HRManagerEmailAddress" : "hrmanger@dnd.vision.com", "Username" : "jdoe", "ResourceOrgRoleCode":" SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName" : "NA Support", "ResourceOrganizationName" : "JSmithOrg", "RawWorkPhoneNumber" : "6504461212", "AddressLine1" : "100 Oracle Parkway", "City" : "Redwood City", "State" : "CA", "PostalCode" : "944065", "Country" : "US", }
Response Payload
Here's an example of the response body in JSON format.
{ "PartyName": "Jane Doe", "ResourceType": "INDIVIDUAL", "FormattedAddress": "100 Oracle Parkway,REDWOOD CITY, CA 944065", "Username": "jdoe", "City": "Redwood City", "Country": "US", "PostalCode": "944065", "FirstName": "Jane", "LastName": "Doe", "ResourcePartyNumber": "Conta765976", "State": "CA", "ResourceEmail": "jane.doe@dnd.vision.com", "RawWorkPhoneNumber": "6504461212", "RawMobilePhoneNumber": null, "RawFaxNumber": null, "AddressLine1": "100 Oracle Parkway", "ResourceOrganizationName": "JSmithOrg", "ResourceOrganizationUsage": " SERVICE_RESOURCE_ORGANIZATION ", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":" SERVICE_REPRESENTATIVE ", "ResourceParentOrganizationName" : "NA Support", "ResourceManagerFirstName": "John", "ResourceManagerLastName": "Smith", "HRManagerEmailAddress": "hrmanger@dnd.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, ... }
Create an Internal Resource without a User Account
Katty Smith is a new
internal resource in John's organization. However, her manager does
not want to create a user account for her. You can create a record
for Katty Smith by setting the CreateUserAccountFlag
flag to N in the request payload. All the other steps are same as
the procedure to Create an Internal Resource.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers
cURL Command
curl
--user sales_cloud_user -X POST -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers
Request Payload
Here's an example of the request body in JSON format.
{ "FirstName":"Katty", "LastName":"Smith", "ResourceEmail":"katty.smith@dnd.vision.com", "HireDate": "2018-12-05", "LegalEntity": "Vision Corporation", "BusinessUnit": "Vision Corporation Enterprise", "HRManagerEmailAddress" : "HR.Manager@dnd.vision.com", "ResourceOrgRoleCode": "SERVICE_REPRESENTATIVE ", "ResourceParentOrganizationName" : "HRManager_Org", "ResourceOrganizationName" : "kSmithOrg", "RawWorkPhoneNumber" : "6504461212", "AddressLine1" : "100 Oracle Parkway", "City" : "Redwood City", "State" : "CA", "PostalCode" : "944065", "Country" : "US", "ResourceStartDate" : "2018-12-05", "CreateUserAccountFlag" : "N" }
Response Payload
Here's an example of the response body in JSON format.
{ "PartyName": "Katty Smith", "ResourceType": "INDIVIDUAL", "FormattedAddress": "100 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": "6504461212", "RawMobilePhoneNumber": null, "RawFaxNumber": null, "AddressLine1": "100 Oracle Parkway", "ResourceOrganizationName": "KSmithOrg", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName" : "HRManager_Org", "ResourceManagerFirstName": "John", "ResourceManagerLastName": "Smith", "HRManagerEmailAddress": "HR.Manager@dnd.vision.com", "HireDate": "2018-12-05", "ResourceOrgMemRoleStartDate": "2018-08-20", "ResourceManagerPartyNumber": "100010034246635", "ResourceManagerPartyId": 100010034246635, "PersonNumber": "300100159661235", "BusinessUnit": "Vision Corporation Enterprise", "LegalEntity": "Vision Corporation", "UserStatus": "A", "PersonType": "EMP", "CreateUserAccountFlag": "N", ... }
Retrieve Internal Resources
There are several situations in which you may want to retrieve internal resources. For example, John Smith may want to retrieve a list of his direct reports to review their educational information to determine training needs.
- Construct the request URL for the appropriate GET operation:
- Use an appropriate REST API client or the cURL command-line utility to make the GET call.
For a full list of supported finders, see the documentation for the Resource Users API.
Retrieve an Internal Resource by Email
In this example, you can find the steps to retrieve an internal resource by specifying the email ID in the ResourceEmail finder.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers?q=ResourceEmail='john.smith@dnd.vision.com'
cURL Command
curl --user sales_cloud_user -X
GET -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers?q=ResourceEmail='john.smith@dnd.vision.com'
Response Payload
Here's an example 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": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_MANAGER", "ResourceParentOrganizationName" : "NA Support", "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, ... }
Retrieve an Internal Resource by User Name
In this example, you can find the steps to retrieve an internal resource by specifying the user name in the Username finder.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers?q=Username='jdoe439906587'
cURL Command
curl --user sales_cloud_user -X
GET -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers?q=Username='jdoe439906587'
Response Payload
{ "PartyName": "Jane Doe", "ResourceType": "INDIVIDUAL", "FormattedAddress": "500 Oracle Parkway,REDWOOD CITY, CA 944065", "Username": "jdoe439906587", "City": "Redwood City", "Country": "US", "PostalCode": "944065", "FirstName": "John", "LastName": "Smith", "ResourcePartyNumber": "Conta765976", "State": "CA", "ResourceEmail": "jane.doe@dnd.vision.com", "RawWorkPhoneNumber": "6505061212", "RawMobilePhoneNumber": null, "RawFaxNumber": null, "AddressLine1": "500 Oracle Parkway", "ResourceOrganizationName": "JSmithOrg", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName" : "NA Support", "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
You may have to often promote, demote, or change the role of internal resources in your organization. The PATCH method lets you change the role of an internal resource. When you promote or demote an internal resource, their current role ends and a new membership with a new role begins.
Note:
You can use the Resources Users API to promote or demote a resource only in Sales and Fusion Service. You cannot use the API to perform HCM related transactions. To continue with our example, suppose John Smith has been promoted to the role of Service Manager. Here's how you can go about changing his role:- Construct the request URL for the Update a resource user operation.
- Construct the request body by specifying the needed request parameters and their values. You change the role provisioning when you want to promote or demote an internal resource.
- Use a REST API client or the cURL command-line utility to make the PATCH call.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta504976
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/Conta504976
Request Payload
Here's an example of the request body in JSON format.
{ "ResourceOrgRoleCode":"SERVICE_MANAGER" }
Response Payload
Here's an example 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": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_MANAGER", "ResourceParentOrganizationName" : "NA Support", "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, ... }
You can follow a similar method to demote an internal resource. However, if you are demoting a resource that has members in their organization, you must update all the members with a new manager and a resource organization.
For example, when you demote a Service Manager to Service Representative, you must first assign a new manager and an organization to all the members in the Service Manager's organization. If you do not update the manager and the organization, then the employees in the manager's organization will not have a hierarchy, which in turn could impact the functionality of the organization.
For example, suppose John Smith, a Service Manager, handles 2 million dollars' worth of opportunities, along with his team. If John Smith is demoted to a Service Representative, and the sales hierarchy is not re-built, that is if the team members of his old organization are not assigned a new manager and an organization, then the sales report may not correctly reflect the 2 million dollars' worth of opportunities.
Transfer an Internal Resource
Internal resources can move to other organizations within the same organization, because of internal transfers or organizational changes. For example, suppose Katty is transferred from the North Americas service organization to the global service organization. How will you go about reflecting this change in Oracle CX Sales and Fusion Service using REST APIs?
The ResourceParentOrganizationName
indicates the organization hierarchy of an internal resource. Use
PATCH to transfer internal resources with the appropriate ResourceParentOrganizationName
attribute value. For internal resources with a child hierarchy,
you must first move the child hierarchy to another internal resource.
If you do not move the child hierarchy, then the child internal resources
will not have any hierarchy.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta855676
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/Conta855676
Request Payload
Here's an example of the request body in JSON format.
{ "ResourceParentOrganizationName":"GLOBAL_SERVICE" }
Response Payload
Here's an example 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": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName" : "GLOBAL_SERVICE", "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, ... }
Update Internal Resource Information
Internal resource information can change over the resource's life-cycle. These changes can be frequent, and you have to update the internal resource information in Oracle CX Sales and Fusion Service, to keep it in sync with your third-party application. For example, Katty's work phone number has changed after her transfer to the new organization. You can use the Update a resource user operation (PATCH method) of the Resource Users API to update the information. We recommend that you update only the fields that have changed from the last update.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta855676
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/Conta855676
Request Payload
Here's an example of the request body in JSON format.
{ "RawWorkPhoneNumber": "6505061409" }
Response Payload
Here's an example 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": "6505061409", "RawMobilePhoneNumber": null, "RawFaxNumber": null, "AddressLine1": "500 Oracle Parkway", "ResourceOrganizationName": "KSmithOrg", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode":"SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName" : "GLOBAL_SERVICE", "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
Sometimes, you may have to end-date an internal resource. This may be because of the resource resigned, or the contract expired, or the resource is transferred to a non-sales organization.
Note:
Expiration of contract does not invoke a HR transaction.Suppose you want
to set the end date of Diane Cho to 31-Jun-2019. You update the ResourceEndDate
attribute of
the resource with the date. This does not delete the record of the
internal resource, but only removes the usage on the end date. For
internal resources with a child hierarchy, you must ensure that the
child hierarchy moves to another resource before the end date. If
you do not move the child resources, then they will not have a hierarchy
and this will result in errors. You can retrieve the ResourcePartyNumber
for
a resource by using a finder to search the resource.
- The user login of the internal resource may be suspended if there are no roles provisioned to the user after the resource end-date.
- End-dating an internal resource only end-dates job roles mapped to the resource roles.
- If the internal resource has been assigned other roles that are independent of resource roles, then end-dating such a resource would not suspend the user account.
- End-dated resources will not be available as members or owners of transaction objects such as Account, Opportunity, and so on.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982
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/Conta765982
Request Payload
Here's an example of the request body in JSON format.
{ "ResourceEndDate": "2019-06-31" }
Response Payload
Here's an example 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 Support", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode": "SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName": "NA Support", "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 a User Account
There are times when you want to suspend an
internal resource account for a certain period of time instead of
end-dating them. For example, Diane Cho's contract has expired and
her account has to be temporarily suspended. You can suspend an internal
user account by setting the UserStatus
attribute for the user, using the PATCH method. You can suspoend
an internal resource account only when there are no validation errors,
as the Resource Users REST API validates the entire resource object
before suspending the account. When you suspend an internal resource,
there is no change to the user's current role but the user will not
be able to login.
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 without changing any resource attributes, then use the Users REST API .Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982
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/Conta765982
Request Payload
Here's an example of the request body in JSON format.
{ "UserStatus" : "S" }
Response Payload
Here's an example 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 Support", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode": "SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName": "NA Support", "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 a User Account
You can reactivate a suspended user account by simply setting the UserStatus attribute to A. For example, to reactivate Diane Cho's user account after her contract has been renewed.
Example Request URL
Use this resource URL format.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.19.01/resourceUsers/Conta765982
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/Conta765982
Request Payload
Here's an example of the request body in JSON format.
{ "UserStatus" : "A" }
Response Payload
Here's an example 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 Support", "ResourceOrganizationUsage": "SERVICE_RESOURCE_ORGANIZATION", "ResourceOrgMemRoleEndDate": "4712-12-31", "ResourceOrgRoleCode": "SERVICE_REPRESENTATIVE", "ResourceParentOrganizationName": "NA Support", "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", ... }