How can we save Customers Details that we save in Reservation Entity to be saved also in Customer Entity

Hello,

As you can see in this screenshot that I could save the customers name , phone number and all their details .So while I proceed with Customers details and click on Save Reservation, I would like to have the data of the customers to also be saved on to my Customer Entity as well. It would really be helpful if someone could help me with scenario

Thank you

Do you know what your primary field is for Customers? (Look at Manage → Entity Types → Customers )

mJpw6hK0Pk
It does not have to be the same as the above screen shot, I just need to know what you are using for a primary field.

hello @Bob_be

I will attach the screenshot below

Great! You are using a phone number. That makes things easier.

Do you just want to add a customer to the customer entities (if it does not exist) when you press Save Reservation?

Is there anything else you would like to have it do?

yes . so here is the scenario , when a customer books for an reservation ,while I click on Save Reservation i need their datas to be saved to our Customer Entity that i had shown.

To do this we will need to create 1 new Action, modify 1 rule and add 1 more rule.

Action: Create Customer & Name

Action Name: Create Customer & Name
Action Type: Create Entity
Entity Type Name: Customers
Entity Name: [:Customer Phone]
Custom Fields: Name=[:Name]
Create Account: False

Lj2GBN1ETf

What is happening:

We are using this action to create a new customer. If we needed to update an existing customer, we would use the action Update Entity Data. Create Account is relating to finance or charging to a customers account.

Modify Rule: RZV Handle Save Reservation (Add)

Rename Rule Name: RZV Handle Save Reservation (Add) - Existing Customer
- Add Custom Constraint
New Constraint:
{REPORT ENTITY DETAILS:E.Name:E.Name="{LOCAL SETTING:RsPhone}"} Is Not Null (blank)

- Save the rule.

What is happening:

We are using the new constraint to check if the customer exists. If there is a customer found this rule will fire. Saving the Reservation.

Next we will create a new rule that will check and save a new customer.

Clone the rule we just modified (RZV Handle Save Reservation (Add) - Existing Customer)

  • Right click on the rule: RZV Handle Save Reservation (Add) - Existing Customer.
  • Select Clone Rule

crRnbjhKXs

  • Rename rule from:
    RZV Handle Save Reservation (Add) - Existing Customer
    to
    RZV Handle Save Reservation (Add) - Create New Customer
  • Change last constraint from *Is Not Null to Is Null
  • Add Action: Create Customer & Name
  • Move to the top of the list
Screen shot

zp3MYvHCXq

Newly Added Action: Create Customer & Name
Customer Phone: {LOCAL SETTING:RsPhone}
Name: {LOCAL SETTING:RsName}

Save rule.

What is happening:

We changed the last constraint to check if there is no customer then this rule will fire. We added the new action to create a new customer using the information on the reservation screen.

sorry , even after saving reservation the customers name & phone where not saved in the Customer Entity

After updating (RZV Handle Save Reservation (Add) - Existing Customer creating) rule I was not able to save the reservation

After cloning the first rule while i checked i get this error message as well

below i will be adding the changes that where made



What is this?


When did this happen?

This will only save the customer when entering a new reservation. If you have an existing reservation, it will not save the customer information. You will have to enter the information by hand.

Can you show all the actions for the rule you posted (_RZV Handle Save Reservation (Add)- Create New Customer). And expand the first action (Create Customer & Name).

Go to Manage → Reports → Reports → Add Report
Enter this report into the Template then click “Preview”
{REPORT OPEN TASK DETAILS:T.Id.asc,T.Identifier:(TST=Reservation)}

Take a screen shot of the report preview and post it here.

1 Like

just after updating both the rules I received this error message

above is the screenshot of the specific rule