Question

Auto Close Business Opportunity


Userlevel 5
Badge +8

I am wanting to understand why the business opportunity does not auto close when the attached sales quote was converted to an order and subsequently closed.

 

Example: 

BO#1 → Converted to SQ#1 → Converted to CO#1

 

BO Status = Confirmed - why is this not closing?

SQ Status = Closed

CO Status = Released


16 replies

Userlevel 1
Badge +4

Hi - i’m also interested on this subject, have you received any feedback? Thank you.

Userlevel 1
Badge +5

Hello, 

In order for the Business Opportunity to Close automatically, you must set this as “True”, otherwise it’s a manual step.

 


Kind regards,

Eric

Userlevel 5
Badge +8

@eric.vives thank you for this information!  I have done some testing with the highlighted above turned to TRUE, but I am still not getting my BO to convert to closed?  What am I missing?

Userlevel 1
Badge +4

Hello, 

In order for the Business Opportunity to Close automatically, you must set this as “True”, otherwise it’s a manual step.

 


Kind regards,

Eric

Thank you Erik - we’ll test it internally and let IFS community know the outcome. 

Userlevel 5
Badge +8

@eric.vives we found the issue.  This only works if you convert a BO to a CO, not if you convert a SQ to a CO.  Is there another way to get the BO to close when converted from a SQ?

Userlevel 1
Badge +4

@eric.vives we found the issue.  This only works if you convert a BO to a CO, not if you convert a SQ to a CO.  Is there another way to get the BO to close when converted from a SQ?

Hi @Tenecia.Seeley ,

 

We’re currently implementing a solution with custom events that will help on that. Still in testing phase but looks promising.

Basically we’re making an event that fired upon SQ state update, wich calls an API code that will look into the linked BO and change it’s state.

 

 

Userlevel 5
Badge +15

Hi @LSO-ME 

Is there any update on this? I am attempting to auto close the BO when converted from a SQ and this is exactly what I need.
Additionally, do you know if BO’s automatically close when their expiration dates are hit?

 

Any and all advise would be greatly appreciated.
Thanks,
Bryan

Userlevel 5
Badge +15

Hi @LSO-ME 

Sorry I just saw that you are also a customer. How did your testing/implementation go?

 

Are you willing to share what you created? I’d be very appreciative.

Thanks,
Bryan 

Userlevel 1
Badge +4

Hi @LSO-ME 

Sorry I just saw that you are also a customer. How did your testing/implementation go?

 

Are you willing to share what you created? I’d be very appreciative.

Thanks,
Bryan 

Hi @bdoucette ,

Since our scenario was very specific, we’ve ended up implementing a custom event that is triggered when a Sales Quotation state changes. 

The custom Event closes the linked Business Opportunity, and also updates the reason field for the BO Close.

 

Example of the API call we’ve used - this exampla closes a BO and set the reason for it (builted-in our logic):

Business_Opportunity_Api.Set_Closed(business_opportunity_no_, 'WON', Order_Quotation_API.Get_Reason_Id(sq_w_quotation_no),'', 'Event - Auto-close - WON' || Order_Quotation_API.Get_Lose_Win_Reject_Note(quotation_no_));

 

Userlevel 5
Badge +15

Hi @LSO-ME 

Thanks! This helps a lot. I was thinking about doing something similar but wasn’t sure if it was the best way to approach the issue, so it’s a good thing that you had the same idea, and actually implemented it before!

Thanks again, I appreciate it!

Bryan

Userlevel 5
Badge +15

Hi @LSO-ME 

I got it to work perfectly, so thanks again.

 

Would you happen to know how to get Business Opportunities to close once their expiration date is equal to the current date? I’m assuming you’d have to set something up to check every day if any Business Opportunities or Sales Quotations are expired, but so far there aren’t any events that get triggered every day to base your workflow off of.

Thanks,
Bryan

Userlevel 1
Badge +4

You can develop a Scheduled Database Task that will trigger a function that will scan the open BO’s and then close them if they are expired according to your criteria.

Thanks,
Licínio

Userlevel 5
Badge +15

Hi @LSO-ME

Thanks again for the quick reply. I appreciate it. 

How can I do this? I’ve created database tasks before but only if they are pre-existing, wouldn’t this require me to create a new one?

Thanks,
Bryam

Userlevel 1
Badge +4

Hi @LSO-ME

Thanks again for the quick reply. I appreciate it. 

How can I do this? I’ve created database tasks before but only if they are pre-existing, wouldn’t this require me to create a new one?

Thanks,
Bryam

Yes - you’ll need to create a new Scheduled Task that would refer your new custom code.

Userlevel 5
Badge +15

Hi @LSO-ME 

Where can you do that? I haven’t seen that before in IFS and I didn’t find anything regarding creating a custom database task. 

I did see that there is a database task called “Set_Closed” for the Business Opportunity entity and I think that’s what I want, but it keeps failing when I run it and I’m not sure If I can set the values to close for our reason id 40 - no response from customer.

I created this schedule

but the error output is: 

ORA-20115: BusinessOpportunity.The "Business Opportunity" has already been removed by another user.

I also saw a task to “set lost” so I’m thinking I might have to chain these together once I get this first one working?

What do you think?

Thanks,
Bryan

Userlevel 5
Badge +15

To add to this, when I remove any value from Expiration date, it works, but I need to narrow down my results by which BO has expired.

Reply