Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return call and response #29

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MichaelaVesterlund
Copy link
Collaborator

No description provided.

readme.md Outdated
@@ -14,6 +14,8 @@ FYI: Some terms have the Swedish name in parenthesis and the file names of the s

**[3. Statistics](#3-statistics)**: A license portal can fetch data from the producers and present the customer with how many licenses that have been acquired and how many that are actually being used. The data includes information on when the licenses were purchased and when they expire.

**[4. Return](#3-return)**: Returns from the reseller's customers to the reseller. The licenses is stored in the reseller's digital warehouse that is provided by the supplier.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be #4

readme.md Outdated
| account.organizationNumber | string | x | Organization number |
| account.name | string | x | Name of the school unit |
| account.rules | array | | Return rules determined by the reseller and verified by the supplier |
| rows | array | x| Return rules determined by the reseller and verified by the supplier |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the comment is a copy/paste error from the previous line

readme.md Outdated
| licenses.status | string | x | error, ok, rulesBroken. See value list below |
| licenses.reason | string | | Used with status NotOk |
| licenses.licenseKey | string | | Licensekey |
| brokenRule.brokenRules | array | | Array with strings. Can be the same or a subset of the rules sent in the return call. See value list above |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "licenses.brokenRules"

| rules | Description |
| --- | --- |
| unAssigned | Return allowed only on licenses that are not assigned |
| notUsed | Return allowed only if the license has not been used |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regading the rules:

If more than one rule is sent, does this mean that it is enough for a license to fulfill only one of the rules, or does it mean that all rules must be fulfilled for the license to be returnable (should the rules be combined with AND or OR)?

What does the specific rules actually mean? Is "notUsed" a license that has never been assigned to a user? Can we change the name of "unAssigned" to "notAssigned" if the meaning is that the license currently isn't assigned to a user?

Is there a need for more rules? Maybe we can discuss this at the next meeting, and add more later?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great questions! I think it should be AND? But that can be discussed, and also what kind of rules do we need? Would be good to get more feedback from other suppliers as well.

readme.md Outdated
status: "Ok",
reason: "",
licenseKey:"235572d0-a26d-4975-97f4-72e4734ff341",
brokenRules:[]dvs.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

readme.md Outdated
Comment on lines 513 to 527
licenses: [{
orderRowId: "64b879b1-1fdc-4a42-ae7c-b4f9b287a2cc",
articleNumber: "9789140123456",
status: "Ok",
reason: "",
licenseKey:"235572d0-a26d-4975-97f4-72e4734ff341",
brokenRules:[]
},{
orderRowId: "64b879b1-1fdc-4a42-ae7c-b4f9b287a2cc",
articleNumber: "9789140123456",
status: "NotOk",
reason: "Returns not allowed after 6 months.",
licenseKey:"61893cba-5572-458b-ba91-53320be8bb44",
brokenRules:["unassigned"]
}]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the call contains a list of "rows", the response also needs to be a list of rows to enable error-handling per row. This is also how Order and Assignment is specified.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oskarsjoberg-sl @fredrikbjurestrom made some changes, please check them out =) rows are now in both call and response.

@pda1609-as
Copy link

pda1609-as commented Mar 20, 2024

Majema rules:
Returns not allowed after 6 months.
Returns not allowed after 3 months.

brokenRules: "notAssigned" and "notUsed"

@MichaelaVesterlund
Copy link
Collaborator Author

Majema rules: Returns not allowed after 6 months. Returns not allowed after 3 months.

brokenRules: "notAssigned" and "notUsed"

Should we add a rule for valid length of returns? Like:
brokenRules: [
{
rule: "validReturnLength",
months: X
},
}

@hekdahl
Copy link

hekdahl commented Mar 22, 2024

Gleerups will not currently be able to support returns via BOL. This as an order may already be invoiced and our system that BOL communicates with does not know if the order has already been invoiced. Gleerups returns must be handled via our support.

Here some "rules" that I see could be relevant:
no support for returns on order
no support for returns on order rows
no support for returns on order rows quantity
no support for returns on Licenses
license period expired
return period from order expired
return period from assignment expired
return blocked by assignment
order blocked by invoice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants