Creating Coupa requisitions from BMC Helix Digital Workplace requests by using Jitterbit Harmony

BMC Helix iPaaS, powered by Jitterbit provides a pre-built integration template to create Coupa requisitions from a BMC Helix Digital Workplace request. Use this integration template to create a Coupa requisition from a BMC Helix Digital Workplace request and displays the corresponding Coupa reference ID in the BMC Helix Digital Workplace request.

To use the integration template with the values defined out of the box:

  1. In BMC Helix Digital Workplace Catalog, create a service with the required questions to gather the data required to create a Coupa requisition
  2. Update the project variables with details of your systems
  3. Map the catalog service fields with the Coupa requisition fields
  4. Then deploy the integration template. 

Currently, only amount based and quantity based requisitions are supported. Catalog based requisitions are not supported.

The template provides the following capabilities: 

Use caseBMC Helix Digital Workplace to Coupa
Create Coupa requistion

Creates a Coupa requisition from a new BMC Helix Digital Workplace service request and return requistion ID to the service request.

Data flow between BMC Helix Digital Workplace to Coupa

The following image describes the flow of data between BMC Helix Digital Workplace and Coupa as defined in the integration template:

Before you begin

You require the following items to successfully set up and use this integration: 

Required versions
  • Coupa version 30.5.0 or later
  • BMC Helix Digital Workplace version 21.02 orlater
Authentication and permissions
  • Access to create service requests in BMC Helix Digital Workplace
  • In your Coupa instance, make sure that:
    • User has access to create requisitions
    • Users for whom the requisition is to be created are defined
    • Currencies, suppliers, billing accounts for the users are defined and in active status
Jitterbit Harmony subscription

A valid BMC Helix iPaaS Open link subscription

Application registration

Register BMC Helix iPaaS with your Coupa instance

To do this, create an API Key in Coupa, and then add it in the Coupa_Api_Key project variable. 

For more information about generating an API key, see API Key Security Open link  in the Coupa documentation.

Task 1: To create the BMC Digital Workplace service for Coupa requisitions

Important

Repeat this procedure for each service for which you want to perform an action in Coupa.

For a detailed description of the procedure to create a service, see Adding and updating services Open link .

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. Select Services > Services.
  3. Select Create New > Service.
  4. Enter a name and version for the service, for example, Coupa Requisition and 1.0. 
  5. From Template, select the catalog service under which you want to create the service, for example, IT Request

  6. Click Create Service.
  7. Under Service Options, click Edit for the following options and provide the details to create the service:

    ConfigurationDescription
    Catalog Profile

    Define the profile to be displayed in the BMC Helix Digital Workplace Catalog.

    For more information about creating the catalog profile, see Adding catalog profile details to a service Open link .

    Workflow

    Define a basic workflow for the service. For more information about defining a workflow, see Workflows for service fulfillment Open link .

    Define the following elements to configure your workflow and then click Save:

    • Under General settings, for Input Variables, enter the following values:

      • Name—Enter a unique name for your variable.

      • Variable ID—Add a unique variable ID.
      • Variable Type—Select Input/Output Variable > Input.
      • Data Type—Select Service Broker Context.
    • Set Service Request Status element:

      • Map the Service ID field to the SB Context > Service Request > Service Request ID.

      • Set the Status field to "Active".

    • Receive Task element: Add this element to the workflow.

    Add a questionnaire for the service.

    For more information about adding a questionnaire, see Adding a questionnaire to a service Open link .
    Important: The values you define in the questionnaire must be defined in Coupa.

  8. Click Save, and then click Close.

  9. Publish the service. 
    For details about publishing a service, see  Approving and publishing services Open link .

Task 2: To download and import the integration template project file

  1. Download the Create Coupa Requisitions from BMC Helix DWP Request 2022-07-01 Open link  project file to your system.

    This file contains the BMC Helix iPaaSCloud Studio project Create Coupa Requisitions from BMC Helix DWP Request.

    Important

    Your ability to access product pages on the EPD website is determined by the license your company purchased.

  2. As a developer, log in to BMC Helix iPaaS and navigate to the Cloud Studio.
  3. On the projects page, click Import.
  4. Click Browse and then select the Create Coupa Requisitions from BMC Helix DWP Request 2022-07-01 file you downloaded.
    The Project Name and Organization fields are automatically populated depending on the values defined. 
  5. From the Environment list, select the environment to which you want to import this integration template, and then click Import.
    The project opens after the integration template is imported. 
  6. To open the project file at a later time, select the environment where the integration templates are available, select the Create Coupa Requisitions from BMC Helix DWP Request project, and click View/Edit.

Task 3: To update the project variables for the integration template

  1. Click the ellipses ... next to the Environment name and select Project Variables.
  2. Update the following project variables for the for BMC Helix Digital Workplace, Coupa, BMC Helix Digital Workplace, and BMC Helix iPaaS applications:

    Project variableValue
    BMC Helix Digital Workplace
    DWPC_URLEnter the BMC Helix Digital Workplace Catalog host URL.
    DWPC_UserEnter the user ID to access BMC Helix Digital Workplace Catalog.
    DWPC_PasswordEnter the password for the user to access BMC Helix Digital Workplace.
    DWPC_Service_NameEnter the name of the BMC Helix Digital Workplace Catalog service created for Coupa requisition.
    BMC Helix Innovation Studio
    Helix_Platform_API_PrefixEnter a predefined prefix for the names of the WebAPI, Process, Document, and Rules created for BMC Helix Digital Workplace in BMC Helix Innovation Studio.
    Helix_Platform_UrlEnter the BMC Helix Innovation Studio URL.
    Helix_Platform_UserEnter the user ID to access BMC Helix Innovation Studio.
    Helix_Platform_PasswordEnter the password for the user to access BMC Helix Innovation Studio.
    Coupa
    Coupa_URLEnter the URL to access your Coupa instance.
    Coupa_Default_Login

    Enter the Coupa login ID.

    Make sure tha the login ID used is configured in Coupa.

    Coupa_Api_Key

    Enter the API Key generated in Coupa for BMC Helix iPaaS.

    Coupa_Default_Currency

    Enter a value for the default Currency Code to be used when creating a requisition, if no input is received from the BMC Helix Digital Workplace request.

    Coupa_Default_Shipping_AddressEnter a default Shipping Address Code to be used when creating a requisition, if no input is received from the BMC Helix Digital Workplace request.

    BMC Helix iPaaS

    BHIP_Host

    Enter the URL to access BMC Helix iPaaS.

    BHIP_Username

    Enter the user ID to access BMC Helix iPaaS.

    BHIP_Password

    Enter the password of the user ID to access BMC Helix iPaaS.

    BHIP_API_Name

    Enter a name of the API that is created in BMC Helix iPaaS.

    This API receives the webhook requests from Coupa.

    BHIP_API_User_Roles

    Enter comma-separated values of the user roles assigned for the BMC Helix iPaaS API.

    Only a user with these roles can access the APIs. Leave this value blank to restrict access only to administrators.

    BHIP_Vendor_API_Profile_Username

    For security profile type BASIC, enter the user name to be used to create the security profile.
    The Jitterbit API and the Webhook API use this user name for authentication while accessing BMC Helix ITSM.

    BHIP_Vendor_API_Profile_Password For security profile type BASIC, enter the password for the security profile created. 
    This password is used for authentication by the Jitterbit API and the Webhook API.
    BHIP_Vendor_API_Profile_ApiKey_Name
    Enter the name for the APIKEY to be used when creating the Coupa profile of type APIKEY.
    BHIP_Vendor_API_Profile_Type

    Enter a security profile type.

    You can set the following values for this variable:

    • BASIC (Default)
    • ANONYMOUS
    • APIKEY

    Use comma-separated values to specify multiple security profile types.

    Security Profile Type defines the authentication type to be used by the Webhook API while accessing Coupa. This value is added in the BMC Helix iPaaS Jitterbit API.

    Important:

    • For profile types supported by the Coupa application, the security profiles are automatically created by the integration template when you enable the integration. 
    • BMC Helix iPaaS does not support OAuth authentication for this application.

Task 4: To update out-of-the-box mappings

  1. Open the Create Coupa Requisitions from BMC Helix DWP Request project.
    Out-of-the-box field mappings are defined in the script element of the DWP to Coupa Mapping operation in the 5.0 Field Mappings workflow. You must update the payload to map the fields you defined in the BMC Helix Digital Workplace service with corresponding Coupa fields.
    For additional information about the workflow, see Workflows included in the integration template.  

    The following table lists the fields that are mapped out-of-the-box in the Coupa Read Requisition Payload variable of the Coupa Create Requisitions operation. 

    BMC Helix Digital Workplace fieldsCoupa fields

    Requester

    requested-by.login
    Departmentdepartment.name
    Shipping Address Codeship-to-address.name
    Purposejustification
    Summaryrequisition-lines.requisition-line.description
    Unit Pricerequisition-lines.requisition-line.unit-price
    Quantityrequisition-lines.requisition-line.quantity
    Billing Account Coderequisition-lines.requisition-line.account.code
    Billing Account Typerequisition-lines.requisition-line.account.account_type.name
    Unit of Measure Coderequisition-lines.requisition-line.uom.code
    Item Coderequisition-lines.requisition-line.item.name

    Supplier Code

    requisition-lines.requisition-line.supplier.name
    Currency Coderequisition-lines.requisition-line.currency.code
    Commodity Namerequisition-lines.requisition-line.commodity.name
    Payment Term Code

    requisition-lines.requisition-line.payment-term.code

    Shipping Term Coderequisition-lines.requisition-line.shipping-term.code
  2. In the Field Mappings workflow, select the DWP to Coupa script element, click the ellipses ... and select View/Edit.
  3. Update the required mappings in the javascript. 

    <javascript>
    $dwpToCoupaMapping = {
        "Coupa Requisition": {
           "Requisition Type": {
                "coupaField": "",
            },
           "Requester": {
          		"coupaField": "requested-by.login",
                "default": $Coupa_Default_Login,
                "required": true
           },
           "Department": {
                "coupaField": "department.name"
            },
            "Shipping Address Code": {
                "coupaField": "ship-to-address.name",
                "default": $Coupa_Default_Shipping_Address,
                "required": true
            },
            "Purpose": {
                "coupaField": "justification",
            },
            "Summary": {
                "coupaField": "requisition-lines.requisition-line.description",
            },
            "Unit Price": {
                "coupaField": "requisition-lines.requisition-line.unit-price",
            },
            "Quantity": {
                "coupaField": "requisition-lines.requisition-line.quantity",
            },
            "Billing Account Code": {
                "coupaField": "requisition-lines.requisition-line.account.code",
            },
            "Billing Account Type": {
                "coupaField": "requisition-lines.requisition-line.account.account_type.name",
            },
            "Unit of Measure Code": {
                "coupaField": "requisition-lines.requisition-line.uom.code",
            },
            "Item Code": {
                "coupaField": "requisition-lines.requisition-line.item.name",
            },
            "Supplier Code": {
                "coupaField": "requisition-lines.requisition-line.supplier.name",
            },
            "Currency Code": {
                "coupaField": "requisition-lines.requisition-line.currency.code",
                "default": $Coupa_Default_Currency,
                "required": true
            },
            "Commodity Name": {
                "coupaField": "requisition-lines.requisition-line.commodity.name",
            },
            "Payment Term Code": {
                "coupaField": "requisition-lines.requisition-line.payment-term.code",
            },
            "Shipping Term Code": {
                "coupaField": "requisition-lines.requisition-line.shipping-term.code",
            },
        }
    };
    
    </javascript>
  4. To validate the script, click Test, and then to return to the workflow, click the x mark.
  5. Define the json output schema for the updated javascript. 
  6. In the Coupa Create Requisition workflow, add the json output to the Coupa Read Requisition variable.

    1. Click the ellipsis ... on the Coupa Read Requisition variable, and click View/Edit.
    2. On the first screen of the Read dialog, select Yes, Provide New Schema and paste the json output schema in the text area.
    3. Click Next.
    4. Validate the schema and then click Finished.
  7. In the Transformation element of the Coupa Read Requisition workflow, map the fields updated or modified in the schema.
    1. Click the ellipsis ... on the Transformation element, and click View/Edit.
    2. From the variable list, drag the variable to the field mapping you want to update in the Mappings section.
    3. Click Return to Workflow.

  8. (Optional) If you update the field mappings after the integration template is already deployed, to enable the updated mappings, deploy the integration template again. To deploy the integration template, see Task 5: To deploy and enable the project

Task 5: To deploy and enable the project

Deployment is a one-time activity that initializes the integration configurations. The UI displays a message for the deployment status.

To deploy the project and then enable the integration:

  1. To deploy the project, next to the project name, click the ellipsis ..., and select Deploy Project.
  2. To enable the integration, next to the Enable Integrations workflow, click the ellipsis ..., and select Deploy

The following image shows the steps to deploy the project and enable it by deploying the workflow:

After you deploy the integration, when a BMC Helix Digital Workplace request is created by using the catalog service created for Coupa, a Coupa requisition is automatically created with the Pending Approval status. When the Coupa requisition is created, the Coupa requisition ID and a link to the requisition is added to the comments of the BMC Helix Digital Workplace request. If the creation of the Coupa requisition fails, a comment is added to the BMC Helix Digital Workplace request indicating the failure. 

(Optional) Task 6: To set the time for API debug mode

By default, the debug mode is set to 2 hours after you run the integration. Debug logs are updated for the time set for the debug mode. To increase the debug mode for a longer period of time, perform the following steps:

  1. In BMC Helix iPaaS, powered by Jitterbit, select API Manager > My APIs.
  2. Open the API created for the integration. The API name is the value defined in the BHIP_API_Name project variable.
  3. Select Enable Debug Mode Until: and set it for the required date and time.
  4. Save and publish the API.

Workflows included in the integration template

The integration template includes workflows for the basic configuration and each integration use case. The following tables describe the operations defined in each workflow. 

Common

This workflow includes generic operations and scripts that are used in other workflows of the integration template.

Integrations

This workflow defines the required details for the integration.

Operation nameAction
Enable Integrations

Sets up variables required for the integration

BHIP Operations

This workflow defines the operations required to be performed for BMC Helix iPaaS. The following operations are included in this workflow:

Operation nameActions performed
BHIP Login

Logs in to BMC Helix iPaaS by using the credentials provided in the project variables

BHIP Get API DetailsVerifies if any custom APIs or security profiles exist for the integration
BHIP Delete APIDeletes existing APIs, if required
BHIP Delete API ProfileDeletes existing security profiles, if required
BHIP Create API Profile

Creates the security profiles and Rest APIs in BMC Helix iPaaS

BHIP Get Operation IDVerifies if an operation ID exists for the integration
BHIP Get User Roles

Verifies the roles of the users accessing BMC Helix iPaaS

BHIP Create API

Creates the API configuration in BMC Helix iPaaS

BHIP Publish API

Publishes the API configuration to BMC Helix iPaaS

BHIP Rest API Variables

If a Webhook API configuration exists, updates the configuration with the new data

Helix Platform Operations

This workflow logs in to BMC Helix Innovation Studio, and creates the required WebAPI, Process, Document, and Rules created for BMC Helix Digital Workplace. The following operations are included in this workflow:

Operation nameAction
Helix Platform Login

Logs in to BMC Helix Innovation Studio to create the required artifacts

Helix Platform Get Web API ConnectionVerifies if a Web API connection is defined for the integration
Helix Platform Delete Web API ConnectionDeletes any existing Web API connections defined for the integration
Helix Platform Create Web API ConnectionCreates the Web API connection for the integration
Helix Platform Get Documents

Verifies if Documents are defined for the integration

Helix Platform Delete DocumentsDeletes any existing Documents defined for the integration
Helix Platform Create Documents Creates the Documents required for the integration
Helix Platform Get Web API CollectionsVerifies if Web API collections are defined for the integration
Helix Platform Delete Web API CollectionsDeletes any existing Web API collections defined for the integration
Helix Platform Create Web API CollectionsCreates the Web API collections for the integration
Helix Platform Get ProcessesVerifies if processes are defined for the integration
Helix Platform Delete ProcessesDeletes any existing processes defined for the integration
Helix Platform Create ProcessesCreates the required processes defined for the integration
Helix Platform Get RulesVerifies if rules are defined for the integration

Helix Platform Delete Rules

Deletes existing rules defined for the integration

Helix Platform Create Rules

Creates the required rules for the integration
Helix Platform Get Alias MappingVerifies if alias mappings are defined for the integration
Helix Platform Update Alias MappingUpdates any existing alias mappings defined for the integration

Field Mappings

This workflow includes the script to map the BMC Helix Digital Workplace request fields to the Coupa Requisition fields.

Operation nameAction
DWP to Coupa Mapping

Maps the BMC Helix Digital Workplace request fields to the Coupa Requisition fields

DWP Workflow 

This workflow logs in to BMC Helix Digital Workplace and processes the data from the BMC Helix Digital Workplace request to create the Coupa requisition and update the BMC Helix Digital Workplace request with the Coupa Requisition details.

Operation nameAction
DWP Flow Controller

Accepts the request from BMC Helix Digital Workplace and sends it to the DWP Wrapper operation for asynchronous processing, and then responds back to the webhook request

DWP Wrapper

Manages the processing of the Coupa Requisition and update of the requisition details in the Comments section of the BMC Helix Digital Workplace request.

This is the Interface between the DWP Flow Controller and DWP Driver operations. 

DWP Driver

Defines the sequence in which operations need to be called to create the Coupa requisition

DWP LoginLogs in to BMC Helix Digital Workplace
DWP Get Request DetailsRetrieves the details of the BMC Helix Digital Workplace request
Coupa Create Requisitions

Creates the Coupa requisition based on the details retrieved from the BMC Helix Digital Workplace request

DWP Create CommentAdds the Coupa requisition ID and URL to the comments section in the BMC Helix Digital Workplace request
Was this page helpful? Yes No Submitting... Thank you

Comments