Workday Integration

shubsatolive
shubsatolive Expensify Customer Posts: 6 Expensify Newcomer

Hello all,

I've got the Workday integration working in parts. Our implementation has created a report, and given me the credentials. I've created an integration user, and was able to connect to Employee Update API via Postman. However, I keep getting an error when I'm trying to import the Employee Data.

{
    "policyIDToEmployeesMap": {},
    "diff": {
        "diffToAdd": {}
    },
    "securityGroupEmployeesMap": {},
    "policyIDToEmailsToRemoveMap": {},
    "message": "Could not load employee data",
    "updatedEmployeesCount": 0,
    "responseCode": 405,
    "dry-run": true
}

I believe this is due to the formatting of the report in Workday.

Can someone with experience on the Workday side tell me how they've setup the report so I can share with our implementation team?

Part 2 of the integration will be asking them to ping the Expensify API using their Studio Builder. If you've got information to help, please let me know. I would really appreciate it.

Best,

Shubs

Answers

  • Jeremy Boniface
    Jeremy Boniface Expensify Team Posts: 202 Expensify Team

    Can you show me the request you're using with Postman? I typically recommend using curl, rather than Postman, for what it's worth. There are a number of things that could be incorrect -- the formatting of the report is a potential problem, but how you're flagging and attaching the data is another (which is why curl is preferred over Postman, since Postman has a UI that complicates it a little).

  • shubsatolive
    shubsatolive Expensify Customer Posts: 6 Expensify Newcomer

    Here's the screenshot of the Postman command, and below is the CURL command that Postman also generates.


    curl --location --request POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'requestJobDescription={
      "type": "update",
      "dry-run" : true,
      "credentials": {
        "partnerUserID": "aa_shubs_sheth_oliveai_com",
        "partnerUserSecret": "<< removed >>",
            "feedUrl": "https://wd2-impl-services1.workday.com/ccx/service/customreport2/oliveai1/ISU_Expensify/INT012_Expensify_Basic_EE_Report?format=json",
        "feedUser": "<< removed >>",
        "feedPassword": "<< removed >>"
      },
      "dataSource" : "download",
      "inputSettings": {
        "type": "employees",
        "entity": "generic"
      },
      "onFinish":[
        {"actionName": "email", "recipients":"shubs.sheth@oliveai.com"}
      ]
    }'
    
  • Matt Moore
    Matt Moore Expensify Customer, Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 132 Expensify Team

    Hey @shubsatolive! Could you post an example of the JSON you're generating?

  • shubsatolive
    shubsatolive Expensify Customer Posts: 6 Expensify Newcomer

    @MattMoore here's the sample:

    {
       "Company": "CrossChx",
       "Employee_Email": "shubs.sheth@oliveai.com",
       "Manager_Email": "<<removed>>@oliveai.com",
       "Employee_ID": "<<removed>>927",
       "Employee_Name": "Shub Sheth",
       "Location": "IN001 - The Hub"
    },
    
  • shubsatolive
    shubsatolive Expensify Customer Posts: 6 Expensify Newcomer
  • Ted Harris
    Ted Harris Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 359 Expensify Team

    That looks about right to me, as long as you have it structured within the report entry, as described here:

    "Report_Entry": 
    [{
       "Employee_ID": "XXXXXX",
       "Worker_Status": "Active",
       "Legal_First_Name": "xxx",
       "Legal_Last_Name": "xxx",
       "Employee_Work_Email": "xxx@sample.com",
       "Manager_Email": "xxx@sample.com",
       "Employee_Company_Code": "110",
       "Employee_Location_Code": "110",
       "Employee_Cost_Center_Code": "2130"
    }]
    

    That may not be the case here though because I see on our side the error: A JSONArray text must start with '[' at 1 [character 2 line 1]'

    Can you confirm that for me?

  • shubsatolive
    shubsatolive Expensify Customer Posts: 6 Expensify Newcomer

    @Ted Harris here's a better sample of the data. There is a '[' after the Report_Entry as you see below. Do you think it's the extra curly braces before the report entry that could be causing the issue?

    {
    "Report_Entry": [{
       "Company": "CrossChx",
       "Employee_Email": "hidden@oliveai.com",
       "Manager_Email": "hidden@oliveai.com",
       "Employee_ID": "737372",
       "Employee_Name": "hidden",
       "Location": "IN001 - The Hub"
    },
    {
       "Company": "CrossChx",
       "Employee_Email": "hidden",
       "Manager_Email": "hidden",
       "Employee_ID": "CW100001",
       "Employee_Name": "Betty Boop",
       "Location": "Remote Florida"
    }]
    }
    
  • Francois Laithier
    Francois Laithier Expensify Team Posts: 33 Expensify Team

    Hi @shubsatolive,

    It appears that the Workday credentials feedUser/feedPassword you passed are rejected by Workday. We'll update the error message to make this clearer, but in the meantime, I'd recommend double-checking these values.

    You can simply manually open the https://wd2-impl-services1.workday.com/.... URL in your browser, and enter the feedUser/feedPassword credentials in the Basic Authentication prompt to confirm that they are correct.

  • shubsatolive
    shubsatolive Expensify Customer Posts: 6 Expensify Newcomer

    @Francois Laithier @Ted Harris thanks for the feedback. We were able to resolve the issue for the Username/Pass, but it appears that the documentation provided for reporting format vs. how we needed to structure the actual report is different.

    For example, having a key of "Employee_Work_Email" still gave us an error of missing "employeeEmail". Furthermore, it didn't pick up the policyID automatically even though we passed values. It kept asking for policyID which I had to have hardcoded in the request.

    Am I missing something?

    Please see part of the JSON object below that appears to be working.

    {
       "firstName": "Shubs",
       "lastName": "Sheth",
       "managerEmail": "<<removed>>",
       "Employee_Cost_Center_Code": "Finance : Operations",
       "Employee_Location_Code": "IN001 - The Hub",
       "policyID": "94E9<<truncated>>",
       "Employee_Company_Code": "Olive",
       "isTerminated": "false",
       "employeeEmail": "<<removed>>@oliveai.com",
       "employeeID": "68<<truncated>>"
    },
    
  • Jeremy Boniface
    Jeremy Boniface Expensify Team Posts: 202 Expensify Team

    Sorry, yes, that's incorrect. I'll update the documentation. To clarify, the correct field names are listed here.