Workday: Put_Customer returning an error - data-integration

We are using Snaplogic to load records into workday. Currently, extracting customer records from the source and trying to load them into workday using the object Put_Customer of web service Revenue_Management.
I was getting the following error:
But I'm not getting any category information from the source. So, I tried putting the value for Customer_Category_Reference as 1. But I ended up getting the following error.
The documentation for workday is not helpful and this has been a blocker for me for some time now.
Any help will be appreciated.
Update:
Trying to get customer categories using the Get_Customer_Categories object of Revenue_Management web service using Snaplogic. But getting the following error:
Failure: Soap fault, Reason: Processing error occurred. The task submitted is not authorized., Resolution: Address SOAP fault message and retry

Unfortunately I don't have access to a tenant at this time to validate . However it is likely to work based in prior experience . Perhaps you could create a customer in Workday, through the GUI. Then do get customer API call. Note the category reference . Then, use that in your put customer call

If you look at the API documentation, you will find that Put_Customer accepts a WID in the Customer_WWS_Data object. If you search for "Customer Categories" in Workday, you will likely find the report of the same name. Just select the category that you want your newly loaded customers to default to (click on the magnifying class, then on the ellipsis, Integration Ids, View Ids). The Workday ID will appear at the top.
I have not used the Revenue Management API, but my code for creating a position reference in the Compensation API is probably very similar to what you need to do for the Customer Category reference:
public static Position_ElementObjectType getPositionReference(string WID) {
return new Position_ElementObjectType {
ID = new Position_ElementObjectIDType[] {
new Position_ElementObjectIDType {
type = "WID",
Value = WID
}
}
};
}

Related

HMS Wallet Kit-Error code -1 is returned when I add passes on the device side

I've downloaded the sample project of the Android client from the HUAWEI Developers official website
After installing it on the mobile phone, I want to add a membership card to HUAWEI Wallet.
The demo provides two methods for adding a pass. The key code is as follows:
public void saveToHuaWeiWallet(View view) {
String jwtStr = getJwtFromAppServer(passObject);
CreateWalletPassRequest request = CreateWalletPassRequest.getBuilder()
.setJwt(jwtStr)
.build();
Log.i("testwalletKIT", "getWalletObjectsClient");
walletObjectsClient = Wallet.getWalletPassClient(PassTestActivity.this);
Task<AutoResolvableForegroundIntentResult> task = walletObjectsClient.createWalletPass(request);
ResolveTaskHelper.excuteTask(task, PassTestActivity.this, SAVE_TO_ANDROID);
}
No matter which method I use for adding a pass, error code -1 is returned. I didn't find any description of the error code in the official documentation. Can anyone tell me why error code -1 is returned?
Parameter error. The possible causes are as follows:
No template is created for the passes. Add a template by referring to the following. https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/wallet-guide-webpage
The pass has already been added. Enter the unique ID (serinumber) of another pass.
The template ID and service number are incorrect. Enter the values of passStyleIdentifier and passTypeIdentifier fields used during template creation on the server side.
Incorrect IssuerId. Enter the app ID generated app creation in AppGallery Connect.

Getting response from API - DialogFlow Chatbot

I am creating a chatbot using DialogFlow. Here, I am trying to get response from the API, which has been created by my development team (using python). They provided the API URL and requested to fetch data from it according to the users query. I have created a function in the inline editor and pasted the given API URL.
Below is the API format they have created,
{
“data”: [{
“pincode”: “”,
“location_formatted_address”: “”,
“user_id”: “”,
“department_name”: “Education”,
“locality”: “”,
“status”: “Select_Status”
}]
}
Here, when a user gives a department name, it must respond the user with locality of that specific department.
In the Inline editor, I have applied the following logic to fetch the locality,
function getDatafromApI(agent){
const name = agent.parameters.name;
return getAPIData().then(res => {
res.data.map(issues => {
if(issues.department_name === name)
agent.add(`${name}. ${issues.locality}`);
intentMap.set('Fetch API', APIData);
In the above code, "name" is the parameter given in the intent section.
But, I am not getting any response. Any help?
The inline editor uses Firebase. You will have to upgrade to Firebase "Blaze" OR "Flame" plan as the "Spark"(free) plan does not allow external api calls.
However if you have already upgraded Firebase plan and still seeing this error, you can see the execution logs by clicking "view execution logs" link at bottom of Dialogflow fulfillment window.

Specify Google Task ID on insert

I am working with Google Tasks, using the PHP library:
https://developers.google.com/tasks/v1/reference/tasks
I am trying to insert a task with a custom ID.
I found this topic:
Setting id to task using Google Task API returns 400 invalid value
which points to this topic:
Google tasks update error
They suggest to send the Task ID with the Task title. I think I have done that.
This is the code info from the Google API reference
$task = new Task();
$task->setTitle('New Task');
$task->setNotes('Please complete me');
$task->setDue(new TaskDateTime('2010-10-15T12:00:00.000Z'));
$result = $service->insertTasks('#default', $task);
echo $result->getId();
This is my code, I got setID() from the library itself.
$taskNew = new Google_Service_Tasks_Task();
$taskNew->setId('2013');
$taskNew->setTitle('Notify');
$taskNew->setDue(new TaskDateTime('2018-10-27T00:00:00.000Z'));
$results3 = $service->tasks->insert('.....', $taskNew);
I keep getting an error and it refuses to make the task.
Using this API tool:
https://developers.google.com/apis-explorer/#p/tasks/v1/tasks.tasks.insert
I can insert tasks successfully, so long as the system makes the ID. The Google Task API will insert the task, but assign its own ID.
If I specify a custom ID, then I get a 400 error "Invalid value".
I am making tasks to correspond to events saved in my program's database. I need to be able to find the task that matches a database event when I need to make changes to the due date or completed.
The reason I want to set my own ID, is so I can find the specific task and make changes.
I could add a new field to the database with the ID that google generates. But I would prefer to not have to change the database and the rest of the program as well.
Thanks so much for any help,
- Jon
Task Id is the read-only parameter.
I solved this question by using a prefix for the task`s Title.
For example: "[my_id] Task Title".

Invoking JIRA Rest API to create an issue containing a locked custom fields like Epic Name

I'm trying to create an Epic Issue in JIRA using the REST API.
There is a field called "Epic Name", which is required and locked.
When I submit the following JSON
URL: https://jira:443/jira/rest/api/latest/issue
{"fields":{"project":{"key":"TEST"},"issuetype":{"name":"Epic"},"summary":"TestSummary","Epic Name":"TestName"}}
The Response is:
Http Error : 400{"errorMessages":[],"errors":{"Epic Name":"Field 'Epic Name' cannot be set. It is not on the appropriate screen, or unknown."}}
What is wrong, since in the screen Epic Name is there and required (obviously, since it is a required attribute). What could be the problem?
Thanks
The problem is not that the field is not on the screen but that for JIRA API, the field name Epic Name is invalid/unknown. The actual ID of that field is customfield_10016 which you have to put in the query. The value should be the Issue Key for that specific Epic instead of just a name.
{
"fields": {
//other data
"customfield_10016": "PROJECTKEY-69"
}
}
I tried with customfield_10016 but it didn't work for me.
I have researched more about the same and got to know the custom field may differ for JIRA instance.
We can get custom field for our JIRA insatnce and project using below API and use it - http://<JIRA_URL>/rest/api/2/issue/createmeta?projectKeys=<ProjectKey>&issuetypeNames=<IssueType>&expand=projects.issuetypes.fields

Get the first product id in a magento system via soap api (2)?

Question: Is there a way (api call) to get the first product id in a magento install via the soap api.
I'm attempting to download all the products from a magento system and insert them into a different database (I do the conversion myself so that's not a bother) What is hard to understand though is how do I get a list of the product id's without getting all of them, if all I know is that the site is up.
Here's the info I have.
soap end point
soap username
soap apikey (aka password)
Here's what I don't know.
the id of any of the products
the date any of the products were created on or last edited.
For my initial load, I have to do a where product id in, because I expect 20 to 40k product lists won't come back in one soap call.
So I call
where id in (1 -> 100) Nope
where id in (101-> 200) Nope..
Now as you can imagine that code smells something fierce. It works, but I have to think there is a better way..
To expand my question: Is there a better way?
I can post the XML that I'm sending if that helps. The language I'm using to create the soap(xml) is vim, so I don't have code I can paste.
Try This
$client = new SoapClient('http://localhost/magento8/index.php/api/soap/?wsdl');
$session = $client->login('soap username', 'soap apikey');
$filters=array('entity_id'=>array(array('lt'=>'1','gt'=>'100')));//get fist 100 result
$result = $client->call($session, 'catalog_product.list',array($filters));
var_dump($result);
for more attributes check this
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/using_collections_in_magento