Jimmy Zhou


Hello everyone!

I want to change the contact-card message and i don't want to change it in the .bfg file. Because the contact-card message is always changing.

Is it possible to change it by a procedure written in pkg file

Many thanks.

Wait on line.





Re: Change Contact Card

Tom Ragle - MSFT


In lib:/Utilities/MSNUtilities, there is this procedure:

ABMSNSetPersonalMessage(MESSAGE)

which sends a "setcontactcard" event to the Messenger client. You can create a background procedure to call this during startup, so whenever the agent starts up, the message will still be there.







Re: Change Contact Card

Jimmy Zhou

Great! It works fine.

Thank you!







Re: Change Contact Card

Riaanvs

Hi

Can I just confirm that this does not work for a provisioned BOT, or has this changed In our experience changing the contact card for a provisioned bot only takes effect if either the bot is restarted or the user signs in again.
The same applies to the buddy icon.

Riaan
London






Re: Change Contact Card

Jimmy Zhou

It does't need to restart the bot or the user signs in again.

The contact card changes when you use that procedure

show you a test code block:

Code Block
+ set contact card
TEXT = SelectRandom("test1","test2","test3","test4")
call ABMSNSetPersonalMessage(TEXT)

So when you type 'set contact card' the contact card changes immediately.

Hope it give you some help.






Re: Change Contact Card

Riaanvs

Jimmy

Yes, we know this works but have you tried it on a provisioned bot

Riaan





Re: Change Contact Card

Jimmy Zhou

Can you explain the meaning of provisioned bot

Does it mean the bot deployed formally by Live Agent Team






Re: Change Contact Card

Tom Ragle - MSFT

There are 2 ways to set the contact card. One is to add the "contact-card" directive to the BFG, which means that when the bot launches on the Messenger network it will use that text. This requires a restart, regardless of whether or not the screen name is provisioned.

The other way is as described above, by sending an event to the Messenger client via BuddyScript calls.






Re: Change Contact Card

Jimmy Zhou

Tom Ragle - MSFT wrote:

In lib:/Utilities/MSNUtilities, there is this procedure:

ABMSNSetPersonalMessage(MESSAGE)

which sends a "setcontactcard" event to the Messenger client. You can create a background procedure to call this during startup, so whenever the agent starts up, the message will still be there.

Hi, Tom

Could you show me the place of 'agent starts up'

I just found these procedures from the SDK, but it seems that no one is the right procedure to be called when agent starts up.

ABUserArrives()
ABFirstProc()
ABHelloProc()

ABStartSessionProc()

Thanks

Jimmy






Re: Change Contact Card

Bart Riepe

Code Block

procedure MyOwnProcedure() startup [every 60 seconds]



I think this is what you are looking for Smile just put this code somewhere in a dll file and treat it as a normal procedure, it will be executed at startup. Additionally you can define the extra parameter which will also execute your procedure every 60 seconds (or any other time you define).

More information




Re: Change Contact Card

Jimmy Zhou

I just tried that. But when it was compiled, the SDK showed an error. Does this procedure work on new version of SDK

My SDK's version is 4.0 build 1028

Thanks






Re: Change Contact Card

Tom Ragle - MSFT

Jimmy, can you provide details about the error






Re: Change Contact Card

Riaanvs

Tom

I just want to update you on this in that we've tested this on our provisioned bot, and it does not work immediately like it does for an unprovisioned bot; the user has to sign out and sign back in to see the change (contact card and buddy icon changes).

This is important for the group to understand, and I appreciate confirmation that a provisioned bot's icon and contact card changes do no reflect immediately.

Thanks
Riaan






Re: Change Contact Card

Jimmy Zhou

Hi, Tom

The error is

[E1] In procedure definition 'MyOwnProcedure', garbage found at end of the line: "[every 60 seconds]".

The procedure is

Code Blockprocedure MyOwnProcedure() startup [every 60 seconds]
-ADASDFDF

Thanks






Re: Change Contact Card

Tom Ragle - MSFT

Sorry I didn't look more closely at your code. The brackets are invalid. It should be:

Code Block
procedure MyOwnProcedure() startup every 60 seconds

Check out background procedures here: https://buddyscript.colloquis.com/docs/SDKWin/st_re054.html