Skip to content

Fanwei e-cology Data Synchronization

Overview

This article describes the OAuth-based data synchronization configuration process between Fanwei e-cology 9.0+ and BambooCloud IDaaS.

Synchronization Configuration

BambooCloud IDaaS Configuration

  1. Add the pre-integrated application Fanwei e-cology 9.0+.

  2. Configure authentication parameters.

    Fill in the trusted domain name with the OA access address, such as: https://oa.xxx.com

  3. Enter Application Details > Authorization Management > Application Account, click Add Account, select the authorized user, and edit the application account to the user email in ecology.

  4. Obtain the application's ClientId and ClientSecret.

Fanwei Ecology Configuration

  1. The administrator logs in to the Ecology backend engine application center - Integration Center - Unified Authentication Center - Authentication Access Management, and enables OAuth2 integration.

  2. Edit the integration parameters.

    • Basic Information:
      • client_id_key: client_id
      • client_id: Application ClientId in BambooCloud IDaaS
      • client_secret_key: client_secret
      • client_secret: Application ClientSecret in BambooCloud IDaaS
      • code_key: code
      • access_token_key: access_token
      • redirect_uri_key: redirect_uri

  3. Request user authorization interface:

    • Interface address: https://BambooCloud IDaaS tenant domain.bccastle.com/api/v1/oauth2/authorize
    • Request method: GET
    • Request parameters:
      • client_id: $
      • response_type: code
      • redirect_uri: $

  4. Obtain authorization token interface:

    • Interface address: https://BambooCloud IDaaS tenant domain.bccastle.com/api/v1/oauth2/token
    • Request method: POST
    • Request parameters:
      • client_id: $
      • client_secret: $
      • grant_type: authorization_code
      • code: $
      • redirect_uri: $

  5. Obtain user information interface:

    • Interface address: https://BambooCloud IDaaS tenant domain.bccastle.com/api/v1/oauth2/get_user_info
    • Request method: GET
    • Ecology account rule: Email
    • Value field: email
    • Request parameter: access_token: $

  6. Unified logout interface:

    • Enable

    • Interface address: https://BambooCloud IDaaS tenant domain.bccastle.com/api/ams/logout?redirectToUrl=https://oa.xxx.com/

    • Request method: GET

    • Authentication method: Enable PC authentication

  7. OAuth2 integration enabling/disabling requires clicking "Deploy" to take effect; after enabling, click "Deploy" only for the first time, and other modifications only need to be "Saved".

Configure Synchronization Parameters

  1. Configure synchronization parameters.

    ParameterDescription
    Interface Authentication TokenFanwei open interface call token. You can set the authentication method and view authentication parameters by visiting the OA address: /hrm/websevice/hrm_webservice_config.jsp. Currently, BambooCloud IDaaS uses the token+MD5 method.
    Fanwei Domain NameFanwei OA domain name, for example: http://bcfwoa.test.com/
  2. Enter Application Details > Synchronization Configuration. In the general configuration, you can set the processing logic for synchronized data.

  3. The object model saves the system's default attribute parameters. If you need to synchronize other user attributes, select "Object Model — Application Account Model — Attribute Definition" on the left, click "Add", and add attributes.

    ParameterDescription
    Attribute NameThe account attribute of the application system, which can be selected from the dropdown menu, such as homeaddress.
    Display LabelRequired, customizable.
    DescriptionOptional, customizable.
    Attribute TypeDifferent attribute names correspond to different attribute types, determined by the application system attributes, and cannot be modified.
    FormatThe system default cannot be modified.
    RequiredThe system default is not checked.
  4. Switch to the Mapping Definition tab, click "Edit", and configure attribute mapping.

    ParameterDescription
    UserThe attribute mapped from BambooCloud IDaaS to the application, such as mobile number.
    Transformation MethodThe mapping method between BambooCloud IDaaS and application attributes.
    Script ExpressionActivated when the transformation method selects script transformation. For mapping scripts, refer to: How to Develop Mapping Scripts.
    Execution MethodThe method used by BambooCloud IDaaS when synchronizing user data to the target application.
    Application AccountThe account attribute of the application.
  5. If you need to synchronize other organization attributes, select "Object Model — Application Organization Model — Attribute Definition" on the left, click "Add", and add attributes.

    ParameterDescription
    Attribute NameThe organization attribute of the application system, which can be selected from the dropdown menu.
    Display LabelRequired, customizable.
    DescriptionOptional, customizable.
    Attribute TypeDifferent attribute names correspond to different attribute types, determined by the application system attributes, and cannot be modified.
    FormatThe system default cannot be modified.
    RequiredThe system default is not checked and cannot be modified.
  6. Switch to the Mapping Definition tab, click "Edit", and configure attribute mapping.

    ParameterDescription
    OrganizationThe organization attribute mapped from BambooCloud IDaaS to the application.
    Transformation MethodThe mapping method between BambooCloud IDaaS and application attributes.
    Script ExpressionActivated when the transformation method selects script transformation. For mapping scripts, refer to: How to Develop Mapping Scripts.
    Execution MethodThe method used by BambooCloud IDaaS when synchronizing organization data to the target application.

Verify Synchronized Data

  1. Enter "Application Organization - Authorization Policy", enable automatic organization authorization, select the organization scope, click the Save button, and then click Execute Add to see the synchronized organizations.

    TIP

    Synchronization rule description:

    • Sub-departments are allowed under departments.
    • Departments cannot be directly hung under the root organization on the Fanwei side. Therefore, when creating an organization in Users > Organization and Users, select the organization type as Company, and then add sub-organizations as departments under the created organization.
    • Except for the department ID, all other attributes are allowed to be modified.
  2. Enter "Application Account - Authorization Policy", enable automatic user authorization, select the user scope, click the Save button, and click Execute Add to see the synchronized users.

    TIP

    Synchronization rule description: When synchronizing user data, by default, the BambooCloud IDaaS user's Employee ID is converted to the ecology employee number, so the user's Employee ID attribute is required.

  3. View synchronization events. Select "Authorization Management — Synchronization Events" on the left to view the above synchronization records. At the same time, editing and deleting organizations and users can also be viewed and filtered.

  4. Log in to the Fanwei OA management console to view the synchronized organizations and users.

BambooCloud IDaaS Open Platform