Your customers' systems do not always tell you everything you need to route a project correctly. A vendor portal may hide the end customer, or a briefing may name the wrong specialization. A deadline may be set to midnight when the customer actually expects the files the next morning, or may be in the wrong timezone. Sometimes the information you need, such as a product line, a cost center or a file type, lives in another system entirely.
The Update Opportunity API lets you correct or complete this information after BeLazy has received the opportunity and before it is accepted. Everything you add becomes metadata that you can use in your mapping and exception rules, exactly as if the source system had sent it.
This API works with opportunities coming from every connection type: BeLazy's own connectors (vendor portals and TMSes) and workspaces.
When to use it
- Correcting and complementing briefings. The customer's system sends a wrong or missing value, and you fix it: the specialization is empty, the end customer is not there, or the contact person is a generic mailbox. In other cases the customer may send their PO number only in an email, and you would like to add it to the TMS project they send.
- Adding routing information. You want to choose a workflow, a client or a price list based on information the source system does not have. For example, you look up the customer's product line in a Google Sheet, or classify the content based on the file names, and store the result as extra data. In the onboarding wizard you can then create exceptions based on this extra data, for example "if Product line = Medical devices, use the TEP + QA workflow".
- Building custom bundling rules. Some customers enrich opportunities with a value that groups work that belongs together, for example to collect small jobs of the same customer program into one project and avoid a minimum fee applying to each of them.
- Adjusting deadlines. You may want to shift deadlines to overlap with your office hours. This only works before the project is accepted. If you need to change the deadline of a project that is already created in your BMS, use the BMS Extension API instead.
What you can update
You can update the following properties of an opportunity:
- Deadline: expressed as a Unix timestamp in milliseconds,
- End customer,
- Specialization. Any text is accepted. If BeLazy recognizes the value, it is more likely to be mapped to the right specialization in your BMS automatically,
- Contact person (first name, last name, email, phone),
- Extra data: any number of key-value pairs that you define.
Properties you leave out of the request are not changed. Extra data items are merged: if a key already exists, its value is overwritten, otherwise a new item is added. The other existing extra data items remain untouched.
Requirement
- The opportunity must be in Ready status, meaning downloaded and not yet accepted or dismissed. Once an opportunity is accepted, its description is frozen and the update is rejected.
The endpoints, request formats and the schema of every extra data type are described on BeLazy's Update Opportunity API page.
Timing and auto-approval
The update only works while the opportunity is waiting for acceptance. If you use auto-approve rules on the same connection, the opportunity may be accepted before your enrichment arrives, and it will then be created without the added data. Also, a new synchronization overwrites the changes you committed.
To avoid this, we recommend to let your integration accept the opportunity. Do not create auto-approve rules for the connection. Your integration should updates the opportunity and then accept it through the API. This is the most reliable option, because the acceptance always happens after the enrichment.
Using the enriched data in your configuration
After you enrich the first opportunities, the new extra data keys appear among the properties you can select in the onboarding wizard. Go to Edit automation on the connection card and use them for exceptions on the pages that support exceptions, for example workflow, client or price list selection. See Metadata and exception-based configuration.
Tip: Enrich a few opportunities before you configure the exceptions. BeLazy bases the configuration on real project values, so the keys and values have to exist first.
The enriched values are also stored with the BeLazy project. They appear in the API and in the Google Sheets integration, so you can use them for reporting as well.